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

View source: R/stepchk.R

stepchkR Documentation

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)

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.

Value

A nonnegative step size for a linear search.


fda documentation built on May 31, 2023, 9:19 p.m.