Learn R Programming

nlr (version 0.1-3)

nl.robfuncs: Robust Loss functions provided for nlr.

Description

List of nl.form objects of 7 pre defined robust loss functions. Robust loss functions used for robust estimating parameters. They can be used in several part of the package functions.

Usage

nl.robfuncs

Arguments

Format

The format is: list nl.robfuncs[index]

  • nl.robfuncs[1]: huber function.

  • nl.robfuncs[2]: hampel function.

  • nl.robfuncs[3]: bisquare function.

  • nl.robfuncs[4]: andrew function.

  • nl.robfuncs[5]: halph huber function.

  • nl.robfuncs[6]: hampel 2 function.

  • nl.robfuncs[7]: least square (quadratic) function.

Details

Each of loss functions include tuning parameters as extra argument to nl.form. The result is the computed loss function with attributes of "gradient", "hessian", "weights". the object are mostly stored in fnc slot which is function, it can be called directly as a function.

References

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

Examples

Run this code
# NOT RUN {
data(nl.robfuncs)
## maybe str(nl.robfuncs) ; plot(nl.robfuncs) ...
## the object are mostly stored in fnc slot which is function, it can be called
## directly as a function.
plot(seq(-6,6,length.out=30),nl.robfuncs[[1]]$fnc(seq(-6,6,length.out=30)),type="l",
xlab="t",ylab="rho",main=nl.robfuncs[[1]]$name)
# }

Run the code above in your browser using DataLab