Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

aic.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "include/aic.h"

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:
w  Array of weights
n  Length of array

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

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:
w  Array of weights
p  Array of parameters
n  Lengths of arrays

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


Generated on Fri Jan 21 16:17:40 2005 for libPET by  doxygen 1.4.1