Learn R Programming

lmvar (version 1.5.2)

fwbw: Forward / backward-step model selection

Description

Model selection by a forward / backward-stepping algorithm. The algorithm reduces the degrees of freedom of an existing object containing a model fit. It searches for the subset of degrees of freedom that results in an optimal goodness-of-fit. This is the subset for which a user-specified function reaches its minimum. The search is carried out by alternately attempting to remove and insert degrees of freedom.

Usage

fwbw(object, fun, ...)

Arguments

object

Object containing a fit to a specific model

fun

User-specified function which measures the goodness-of-fit.

...

Further arguments for specific methods

Value

A list with the following members.

  • object An object which contains the model for which fun is minimized.

  • fun the minimum value of the user-specified function fun.

See Also

fwbw.lm and fwbw.lmvar_no_fit