gam.scope(frame, response = 1, smoother = "s", arg = NULL, formula = T)
s
frame
(excluding the response). For a numeric variable, say
x
, the formula is
~ 1 + x + s(x)
If
x
is a factor, the last smooth term is omitted.
Each formula describes an ordered regimen of terms, each of
which is eligible on their own for inclusion in the gam model.
One of the terms is selected from each formula by
step.gam
.
If a
1
is selected, that term is omitted.
this.scope <- gam.scope(kyphosis,arg = "df = 6") this.scope # Produces the following: $Age: ~ 1 + Age + s(Age, df = 6) $Number: ~ 1 + Number + s(Number, df = 6) $Start: ~ 1 + Start + s(Start, df = 6) step(gamob,this.scope)