Description Usage Arguments Details Value Author(s) See Also Examples
Performs stepwise model selection for Kernel Semi Parametric Model by AIC or BIC.
1 2 3 |
object |
an object of class "kspm" with only one kernel. |
data |
data. |
linear.lower |
one side formula corresponding to the smallest set of variables that should be included in the linear part of the model. |
linear.upper |
one side formula corresponding to the largest set of variables that may be included in the linear part of the model. |
kernel.lower |
one side formula corresponding to the smallest set of variables that should be included in the kernel part of the model. |
kernel.upper |
one side formula corresponding to the largest set of variables that may be included in the kernel part of the model. |
direction |
the mode of stepwise search, can be one of "both" (default), "backward", or "forward". |
k |
type of information criteria used for the variable selection. If |
kernel.param |
define if hyperparameters should be fixed ( |
trace |
integer. If positive, information is printed during the running of step.kspm. Larger values may give more information on the fitting process. |
This procedure may be done on kspm
object defined with only one kernel part and for which a data frame including all variables was provided. Selection may be done on linear part only, on kernel part only or on both at the same time. To perform selection on linear (resp. kernel) part only, kernel.lower
and kernel.upper
(resp. linear.lower
and linear.upper
) should contain all the variables that should stay in the model for kernel (resp. linear) part.
stepKSPM
returns the selected model.
Catherine Schramm, Aurelie Labbe, Celia Greenwood
extractAIC.kspm
1 2 3 4 5 6 7 8 9 10 | x <- 1:15
z1 <- runif(15, 1, 6)
z2 <- rnorm(15, 1, 4)
z3 <- rnorm(15, 6, 2)
z4 <- runif(15, -10, 2)
y <- 3*x + (z1 + z2)^2 + rnorm(15, 0, 2)
dfrm <- data.frame(x = x, z1 = z1, z2 = z2, z3 = z3, z4 = z4, y = y)
fit <- kspm(y, linear = ~ x, kernel = ~ Kernel(~ z1 + z2 + z3 + z4,
kernel.function = "polynomial", d= 2, rho = 1, gamma = 0), data = dfrm)
stepKSPM(fit, k = 2, data = dfrm)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.