Learn R Programming

nlr (version 0.1-3)

robloss: Robut loss function.

Description

Resturn robust loss function for minimization purpose to find the M-estimate.

Usage

robloss(formula, data, start, robfunc, control = nlr.control(robscale = T), ...)

Arguments

formula

nl.form object of nonlinear regression model.

data

list of data include responce and predictor.

start

list of parameter values of nonlinear model function (\(\theta\) in \(f(x,\theta)\)), initial values or increament during optimization procedure. It must include scale sigma (standard deviation), if not included Fault(9) will be returned.

robfunc

nl.form of rho function. It must include tuning constants k0 and k1.

control

list of nlr.control for controling convergence criterions.

any other arguments might be used in formula, robfunc or tuning constants in rho function.

Value

list of output:

htheta

sum of rho function, include attribute "gradient" and "hessian"

rho

computed rho function and attributes of "gradient" and "hessian"

ri

residuals

hessh.p1

hessian of loss function part1

hessh.p2

hessian of loss function part2, in clasic this part removed but in robust statistics values are significant and can not be omited, See Riazoshams et al 1014

dtilda

D(thilda) part of hessian

fmod

computed function contains esponse and or its gradient and hessian predictor and or its gradient & hessian

Fault

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

Details

Compute Loss function, sum of robust rho function to compute the M-estimate. $$\ell(\theta)=\sum \rho\left(\frac{r_i}{\sigma}\right)$$ Standard deviation \(\sigma\) must be included in start argument list with the name sigma.

References

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

See Also

nl.form, nlr.control, nlmest.NLM, dfr.robloss

Examples

Run this code
# NOT RUN {
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
"robloss"
# }

Run the code above in your browser using DataLab