libtpcmodel
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Functions
include/aic.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double aicSS (double ss, int n, int k)
int aicWeights (double *aic, double *w, int n)
double aicWeightedAvg (double *w, double *p, int n)
double aicModel (double *w, int n)

Function Documentation

double aicModel ( double *  w,
int  n 
)

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:
wArray of weights
nLength 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:
ssSum-of-Squares of the fit
nSample size, i.e. nr of fitted data points
kNumber of fitted model parameters

Definition at line 54 of file aic.c.

double aicWeightedAvg ( double *  w,
double *  p,
int  n 
)

Computation of the Akaike weighted model parameter average. Requires arrays of AIC weight values, and corresponding parameter values.

Returns:
Returns the weighted average.
Parameters:
wArray of weights
pArray of parameters
nLengths 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:
aicArray of AICs
wArray of weights (output)
nLengths of arrays

Definition at line 78 of file aic.c.