Go to the source code of this file.
Function Documentation
Calculates a value describing the relative goodness of models, based on an array of model weights.
- Returns:
- Returns the weighted average of model number.
- Parameters:
-
| w | Array of weights |
| n | Length of array |
Definition at line 134 of file aic.c.
| double aicSS |
( |
double |
ss, |
|
|
int |
n, |
|
|
int |
k |
|
) |
| |
Computation of AIC in the special case of sum-of-squares optimization from the SS, nr of fitted points and nr of fitted parameters. If variance is different between the data points, weighted SS must be given.
- Returns:
- Returns the AIC value.
- Parameters:
-
| ss | Sum-of-Squares of the fit |
| n | Sample size, i.e. nr of fitted data points |
| k | Number of fitted model parameters |
Definition at line 54 of file aic.c.
Computation of the Akaike weighted model parameter average. Requires arrays of AIC weight values, and corresponding parameter values.
- Returns:
- Returns the weighted average.
- Parameters:
-
| w | Array of weights |
| p | Array of parameters |
| n | Lengths of arrays |
Definition at line 111 of file aic.c.
| int aicWeights |
( |
double * |
aic, |
|
|
double * |
w, |
|
|
int |
n |
|
) |
| |
Computation of the Akaike weights for model averaging. Requires an array of AIC values, and an output array for weights.
- Returns:
- Returns 0, if OK.
- Parameters:
-
| aic | Array of AICs |
| w | Array of weights (output) |
| n | Lengths of arrays |
Definition at line 78 of file aic.c.