stepwise {mimR}R Documentation

Stepwise model selection in MIM

Description

Functions to do stepwise model selection in MIM to achieve a new model object.

Usage

stepwise(x, arg = NULL, critlevel=NULL, infconstant=NULL)

Arguments

x A mimModel object
arg Stepwise options to MIM
critlevel Set the critical level for the model selection. Default is 0.05
infconstant Penalizing parameter used when model selection in based on information criteria, see 'details' below.

Details

Setting arg to contain "A" leads to model selection by AIC, i.e. the model with the smallest value of -2log Q - 2 * p is choosen. With BIC, the model with the smallest value of -2log Q - log(n) * p is chosen. Setting infconstant to some value k AND setting arg to contains "A" will lead to selecting the model with the smallest value of -2log Q - k * p.

Value

a mimModel object

Note

Before using mimR, make sure that the MIM program is runnning.

Author(s)

Søren Højsgaard, sorenh@agrsci.dk

References

David Edwards, An Introduction to Graphical Modelling, Springer Verlag, 2002

Examples

data(carcass)
gmd.carc <- as.gmData(carcass)

m.main <- fit(mim(".",  data=gmd.carc))
m.sat  <- fit(mim("..",  data=gmd.carc))

m.main <- mim(".",  data=gmd.carc)
m.sat  <- mim("..",  data=gmd.carc)

m.m <- stepwise(m.main, "f")    # forward
m.s <- stepwise(m.sat, "s")     # backward, exact tests

[Package mimR version 2.0.5 Index]