Learn R Programming

fda (version 6.2.0)

stepchk: Check a step size value for being within parameter limits.

Description

Parameter values are check for a proposed stepsize to ensure that they remain within limits. If not, the stepsize is adjusted to keep within the limits.

Usage

stepchk(oldstep, cvec, deltac, limwrd, ind, climit = 50 * c(-rep(1, ncvec), 
        rep(1, ncvec)), active = 1:ncvec, dbgwrd)

Value

A nonnegative step size for a linear search.

Arguments

oldstep

A positive or zero step size for a line search

cvec

A numeric or matrix parameter vector.

deltac

A vector defining a research direction of the same length as cvec.

limwrd

A logical vector of length 2 indicating whether a lower and/or upper boundary is rached by a step.

ind

An integer that is normally 0 but is 1 if an upper boundary has been reached twice.

climit

A two-column matrix with first dimension that of cvec indicating the lower and upper boundaries for parameter vector values.

active

A logical vector with length that of cvec indicating which parmeter values are fixed (FALSE) or free to be changed (TRUE).

dbgwrd

An integer controlling the amount of information to display for each step.

References

Ramsay, James O., Hooker, Giles, and Graves, Spencer (2009), Functional data analysis with R and Matlab, Springer, New York.

Ramsay, James O., and Silverman, Bernard W. (2005), Functional Data Analysis, 2nd ed., Springer, New York.

Ramsay, James O., and Silverman, Bernard W. (2002), Applied Functional Data Analysis, Springer, New York.