Calculates the Akaike information criterion (AIC) from observed
values, predicted values, the number of observations and the number of
model parameters.
Usage
aic(o, p, k)
Arguments
o
A numeric vector. Observed values.
p
A numeric vector. Predicted values.
k
A number. The number of parameters in the model. Note that k includes
the intercept, so for example, k is 2 for a linear regression model.
Value
Akaike information criterion (AIC)
Details
Interpretation: smaller is better. Akaike information criterion (AIC) punishes complexity of models;
a larger number of parameters (k) means a larger AIC value. As it is sensitive to the number of samples, AIC cannot easily be
compared between datasets of different sizes.
References
Piikki K., Wetterlind J., Soderstrom M., Stenberg B. (2021). Perspectives
on validation in digital soil mapping of continuous attributes. A review.
Soil Use and Management. 10.1111/sum.12694