extractAIC.kspm {KSPM} | R Documentation |
Extract AIC from a Kernel Semi Parametric Model
Description
Computes the Akaike Information Criterion (AIC) for a kspm fit.
Usage
## S3 method for class 'kspm'
extractAIC(fit, scale = NULL, k = 2,
correction = FALSE, ...)
Arguments
fit |
fitted model, usually the result of kspm. |
scale |
option not available for kspm fit. |
k |
numeric specifying the 'weight' of the effective degrees of freedom (edf) part in the AIC formula. See details. |
correction |
boolean indicating if the corrected AIC should be computed instead of standard AIC, may be |
... |
additional optional argument (currently unused). |
Details
The criterion used is AIC = n log(RSS) + k (n-edf)
where RSS
is the residual sum of squares and edf
is the effective degree of freedom of the model. k = 2
corresponds to the traditional AIC, using k = log(n)
provides Bayesian Information Criterion (BIC) instead. For k=2
, the corrected Akaike's Information Criterion (AICc) is obtained by AICc = AIC + \frac{2 (n-edf) (n-edf+1)}{(edf-1)}
.
Value
extractAIC.kspm
returns a numeric value corresponding to AIC. Of note, the AIC obtained here differs from a constant to the AIC obtained with extractAIC
applied to a lm object. If one wants to compare a kspm
model with a lm
model, it is preferrable to compute again the lm
model using kspm function by specifying kernel = NULL
and apply extractAIC
method on this model.
Author(s)
Catherine Schramm, Aurelie Labbe, Celia Greenwood
References
Liu, D., Lin, X., and Ghosh, D. (2007). Semiparametric regression of multidimensional genetic pathway data: least squares kernel machines and linear mixed models. Biometrics, 63(4), 1079:1088.
See Also
stepKSPM for variable selection procedure based on AIC.
Examples
x <- 1:15
y <- 3*x + rnorm(15, 0, 2)
fit <- kspm(y, kernel = ~ Kernel(x, kernel.function = "linear"))
extractAIC(fit)