Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/extractAICkspm.R
Computes the Akaike Information Criterion (AIC) for a kspm fit.
1 2 3 | ## S3 method for class 'kspm'
extractAIC(fit, scale = NULL, k = 2,
correction = FALSE, ...)
|
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). |
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 + 2*(n-edf)*(n-edf+1) / (edf-1).
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.
Catherine Schramm, Aurelie Labbe, Celia Greenwood
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.
stepKSPM for variable selection procedure based on AIC.
1 2 3 4 | x <- 1:15
y <- 3*x + rnorm(15, 0, 2)
fit <- kspm(y, kernel = ~ Kernel(x, kernel.function = "linear"))
extractAIC(fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.