Is anyone familiar with the use of the step.gam
function? I am trying to find the best value for the span parameter for
use in the gam function. The S-Plus help documentation suggests that step.gam
will return the best model (in terms of AIC criteria) from among those that you
have defined in the scope argument.
The example below illustrates what occurred when I
used this function. Does anyone know where I went wrong? Any help
will be greatfully appreciated.
fit.gam <- gam( OUTVAR ~ LOGVAR + VAR1 + VAR2 + VAR3,
binomial, data = "">
step.gam(fit.gam, scope=list(
"LOGVAR" = ~ lo(LOGVAR, span=0.1) + lo(LOGVAR,
span = 0.15) + lo(LOGVAR, span = 0.20)))
The following message appears after running step.gam :
Problem in untangle.scope(object$terms, scope): regimen 1 does
not appear in the initial model