nlmest.NM: Nonlinear MM-estimate, Nelder-Mead.

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/nlmest_NM.R

Description

MM-estimate of a nonlinear function, Using Nelder Mead derivative free optimization method.

Usage

1
2
3
4
nlmest.NM(formula, data, start = getInitial(formula, data), robfunc, 
control = nlr.control(tolerance = 1e-04, 
minlanda = 1/2^25, maxiter = 100 * length(start), robscale = T), 
vm = NULL, rm = eiginv(t(chol(vm))), delta = NULL, ...)

Arguments

formula

nl.form object of the nonlinear function model. See nl.form object.

data

list of data with the response and predictor as name of variable. In heterogeneous case if it include response variable values of heterogenous variance function it asume variance function is function of predictor H(x_i,τ), otherwise it assume is a function of predictor H(f(x_i,θ),τ).

start

list of starting value parameter, name of parameters must be represented as names of variable in the list.

robfunc

nl.form object of robust function used for downgrading.

control

nlr.control object, include tolerance, maxiter,... see nlr.control.

vm

NULL, optional covariance matrix of residuals, used for nonlinear generalized M-estimate.

rm

optional correlation matrix, used for nonlinear generalized M-estimate. rm is correlation matrix of vm, thus only vm is enough to be given. It can be given by user also but not necessary automatically will be calculated by argument eiginv(t(chol(vm))).

delta

increament of Nelder Mead method, default will be calculated 10% of parameter values, in the case of nonconvergence it can be modified manually to acheive convergence.

...

any other argument passed to formula, robfnc, or optimization function.

Details

Nelder Mead is derivative free optimization method. It is used to minimize the robust loss function using ρ function. This method is very slow and sugest to use with a large maximum number of iterations.

The function smptry2 Find next minimum point in Nelder-Mead algorithm. It used for internal usage might not be called by user directly.

Value

result is object of nl.fitt.rob (nonlinear fitt robust) for homogeneous variance, and nl.fitt.rgn for heterogeneous and autocorrelated error (nonlinear fitt robust generalized), see nl.fitt.rgn object detail.

parameters

nonlinear regression parameter estimate of θ.

correlation

of fited model.

form

nl.form object of called nonlinear regression model.

response

computed response.

predictor

computed (right side of formula) at estimated parameter with gradient and hessian attributes.

curvature

list of curvatures, see curvature function.

history

matrix of convergence history, collumns include: convergence index, parameters, minimized objective function, convergence criterion values, or other values. These values will be used in plot function in ploting history.

method

fittmethod object of method used for fitt.

data

list of called data.

sourcefnc

Object of class "callorNULL" source function called for fitt.

Fault

Fault object of error, if no error Fault number = 0 will return back.

htheta

robust loss value including gradient and hessain attributes.

rho

computed robust rho function, including gradient and hessain attributes.

ri

estimated residuals, including gradient and hessain attributes.

curvrob

curvature

robform

nl.form object of robust loss rho function.

if vm is not NULL the nl.fitt.rgn include following extra slots:

vm

covariance matrix, diagonal of variance model predicted values.

rm

cholesky decomposition of vm.

gresponse

transformed of response by rm, include gradinet and hessian attributes.

gpredictor

transformed of predictor by rm, include gradinet and hessian attributes.

Note

This is a slow algorithm, since "nlr" is designed for derivative based, when the gradient does not exist recomend to use this function. When the gradient exists it is strongly recomend to use derivative base methods.

This function is called from nlr, for compatibility it is more efficient to be called by nlr than callind directly.

Author(s)

Maria L. Rizzo

References

Statistical Computing with R, Maria L. Rizzo, 2008, Chopman & Hall/CRC

See Also

nlmest.NLM, nl.form

Examples

1
2
3
4
5
6
7
ntpstart=list(p1=.12,p2=6,p3=1,p4=33)
ntpstarttau=list(tau1=-.66,tau2=2,tau3=.04)
datalist=list(xr=ntp$dm.k,yr=ntp$cm.k)
datalist[[nlrobjvarmdls3[[2]]$independent]]<-ntp$dm.k
fittnml <- nlmest.NM(formula=nlrobj1[[15]], data = list(xr=ntp$dm.k,yr=ntp$cm.k), start=ntpstart,
robscale = TRUE, robfunc = nl.robfuncs[["hampel"]],control=nlr.control(tolerance=1e-8,trace=TRUE))
fittnml$parameters

nlr documentation built on July 31, 2019, 5:09 p.m.

Related to nlmest.NM in nlr...