# nl.hetro: Classic Multi Stage Estimate (CME). In nlr: Nonlinear Regression Modelling using Robust Methods

## Description

(CME) Classic multi stage estimate for nonlinear regression with heteroscedastic error, when variance is function of unkown parameters. The variance function model parameter estimate using pseudo chi-square likelihood of computed sample variance.

## Usage

 1 2 3 nl.hetro(formula, data, start = getInitial(formula, data), control = nlr.control(tolerance = 1e-05, minlanda = 1/2^10, maxiter = 25 * length(start)), varmodel, tau = NULL, ...) 

## Arguments

 formula nl.form object of the nonlinear function model. data list of data include responce and predictor. start list of parameter values of nonlinear model function (θ. control list of nlr.control for controling convergence criterions. varmodel nl.fomr object of variance function model for heteroscedastic variance. tau list of initial values for variance model function varmodel argument. ... extra arguments to nonlinear regression model, heteroscedastic variance function, robust loss function or its tuning constants.

## Details

In stage 1 the nonlinear model parameter estimates by Classic OLS, Stage 2 compute sample variance of data, Stage 3 estimate the parameter of variance function model by maximizing the chi-square pseudo-likelihood function. Stage 4 estimate the final value of function model parameter by generalized least square.

## Value

generalized fitt object nl.fitt.gn. The hetro slot include parameter estimate and other information of fitt for heteroscedastic variance model.

 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. 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. hetro nl.fitt object of fited variance odel: parametersestimate of variance parameter τ formnl.form object of called varmodel. predictorvariance model computed at estimated parameter, H(x;\hatτ) responsesample variance computed used as response variable. historymatrix of convergence history, collumns include: convergence index, parameters, minimized objective function, convergence criterion values, or other values. methodfittmethod object of method used for fitt. dataresponse (z_i) and predictor t variable values, used to computing the variance model. sourcefncObject of class "callorNULL" source function called for fitt. FaultFault object of error, if no error Fault number = 0 will return back.

## Note

Heteroscedastic variance can have several cases, this function assume variance is parameteric function of predictor (H(t;τ)). If data does not include the predictor variable of varmodel (t), the predicted of function model f(x;\hat θ) will replace for (t), otherwise user have to defin (t) or (x) as predictor variable of (H).

## Author(s)

Hossein Riazoshams, May 2014. Email: riazihosein@gmail.com URL http://www.riazoshams.com/nlr/

## References

Riazoshams, H,. 2010. Outlier detection and robust estimation methods for nonlinear regression having autocorrelated and heteroscedastic errors. PhD thesis disertation, University Putra Malaysia.

Riazoshams H, Midi H, and Ghilagaber G, 2018,. Robust Nonlinear Regression, with Application using R, Joh Wiley and Sons.

fittmethod, nl.form, nl.fitt, nl.fitt.gn
 1 2 3 chkft<- nl.hetro(formula=nlrobj1[], data=list(xr=Weights$Date,yr=Weights$Weight), start=list(p1=2200,p2=38,p3=.11), tau=list(sg=.09,landa=2),varmodel=nlrobjvarmdls1[]) chkft\$parameters