stepOptim: Stepwise optimization

Description Usage Arguments Details Value Author(s)

View source: R/Optimization.R

Description

Stepwise estimation for a (sub)model specified by a scope of nonzero parameters.

Usage

1
stepOptim(f, gr, par, direction = "backward", scope, ...)

Arguments

f

a (loss) function to minimize

gr

the gradient of f.

par

the initial parameter vector.

direction

the mode of the stepwise search. The default is 'backward'. The alternative is 'forward'.

scope

either a sequence of indices indicating the nonzero entries in the largest model, or a list containing the components lower and upper, each being a sequence of indices indicating the nonzero entries in the smallest and the largest model, respectively.

Details

The function implements a generic stepwise optimization algorithm. The optimization is done with optim using the BFGS algorithm. The function searches either forward or backwards in the parameter vector, and in each step it chooses among the possible models the best fitting model as measured by the loss function.

Value

A list of length 4. The first element, lambda, is the sequence of dimensions, and the second, beta, is the matrix of parameter estimates. Each column in beta corresponds to an entry in lambda. The third element is status, where 0 means convergence, and 4 indicates convergence problems. The last element msg gives details on convergence status.

Author(s)

Niels Richard Hansen Niels.R.Hansen@math.ku.dk


smde documentation built on May 2, 2019, 4:58 p.m.

Related to stepOptim in smde...