grasp.step.gam {grasper}R Documentation

GRASP-R stepwise selection

Description

Performs a stepwise selection using anova

Usage

grasp.step.gam(object, scope, scale, direction, trace, keep, steps, limit, test)

Arguments

object starting gam object. Use grasp.model to create it.
scope scope list. Use grasp.scope to create it.
scale if test = "Chisq", then scale = 1. If test = "F", scale is calculated. Leave it blank.
direction Direction of the stepwise selection. Either "both", "backward" or "forward".
trace If true, the function is verbose and shows details of all the stepwise selection steps.
keep Leave equal to NULL.
steps Maximal number of steps to be done.
limit p-limit for the selection
test Test to be used for selection, either "Chisq" or "F".

Details

This function is central to GRASP-R. It statistically selects significant predictors for each response variable. grasp.step.gam starts by default with the complete model you first created. You have to create a model first with grasp.model, where gr.selX will hold the selected predictors (see grasp.GUI for details on graphical selection of variables). The procedure goes in loop to try to eliminate one variable at a time. At each step, the lest significant variable is dropped from the model, and the loop starts again with the new model holding the remaining variables. When direction is "both", the procedure also reintroduce variables in the model. The tests (F or Chisq) are used to decide whether a variable should be kept, dropped or reintroduced. At the end of the procedure, the new model is stored in the variable gam.start. It overwrites the precedent model.

Author(s)

Fabien Fivaz fabien.fivaz@bluewin.ch. Ported to R from GRASP http://www.cscf.ch/grasp/ for S-Plus written by A. Lehmann, J.R. Leathwich and J. McC Overton. Look at http://www.fivaz.ch/grasper/index.html for details and update.

See Also

grasp.model,grasp.pred and stat.anova


[Package Contents]