stepwise | R Documentation |
Stepwise model selection in (graphical) interaction models
drop_func(criterion)
## S3 method for class 'iModel'
stepwise(
object,
criterion = "aic",
alpha = NULL,
type = "decomposable",
search = "all",
steps = 1000,
k = 2,
direction = "backward",
fixin = NULL,
fixout = NULL,
details = 0,
trace = 2,
...
)
backward(
object,
criterion = "aic",
alpha = NULL,
type = "decomposable",
search = "all",
steps = 1000,
k = 2,
fixin = NULL,
details = 1,
trace = 2,
...
)
forward(
object,
criterion = "aic",
alpha = NULL,
type = "decomposable",
search = "all",
steps = 1000,
k = 2,
fixout = NULL,
details = 1,
trace = 2,
...
)
criterion |
Either |
object |
An |
alpha |
Critical value for deeming an edge to be significant/
insignificant. When |
type |
Type of models to search. Either |
search |
Either |
steps |
Maximum number of steps. |
k |
Penalty term when |
direction |
Direction for model search. Either |
fixin |
Matrix (p x 2) of edges. If those edges are in the model, they are not considered for removal. |
fixout |
Matrix (p x 2) of edges. If those edges are not in the model, they are not considered for addition. |
details |
Controls the level of printing on the screen. |
trace |
For debugging only |
... |
Further arguments to be passed on to |
Søren Højsgaard, sorenh@math.aau.dk
cmod
, dmod
, mmod
,
testInEdges
, testOutEdges
data(reinis)
## The saturated model
m1 <- dmod(~.^., data=reinis)
m2 <- stepwise(m1)
m2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.