<< cmpmod Regression criterionBayesian >>

stixbox >> stixbox > Regression > criterionAkaike

criterionAkaike

Akaike's Information Criterion for estimated model

Calling Sequence

c = criterionAkaike(n,logL)

Parameters

n :

a 1-by-1 matrix of doubles, integer value, greater or equal to 1, the number of variables in the model

logL :

a 1-by-1 matrix of doubles, integer value, the log-likelihood of the model vs the observations

c :

a 1-by-1 matrix of doubles, the value of the criterion

Description

This function computes Akaike's information criterion, i.e. AIC :

c = 2 n − 2 ln (L)

where L is the likelihood of the model vs the observations.

If the model has a good fit, the criterion is close to zero (and positive).

Examples

// A simple linear regression
X = [
57.
64.
69.
82.
92.
111.
114.
132.
144.
146.
];
Y = [
121.
129.
140.
164.
188.
217.
231.
264.
289.
294.
];
[B,bint,r,rint,stats,fullstats] = regress(Y,[ones(X),X])
logL = fullstats.LogLikelihood
n = size(X,"c")
c = criterionAkaike(n,logL)

Authors


Report an issue
<< cmpmod Regression criterionBayesian >>