Learn R Programming

nlr (version 0.1-3)

nl.lmsGA: Fitt a nonlinear regression model by least median of squares. The Optimization is done by genetic algorithm.

Description

Least Median of square estimate is robust fitt by minimizing the median of squared residuals. This function use the "ga" function,from "GA" package, which minimize using genetic algorithm method.

Usage

nl.lmsGA(formula, data, start,min=NULL,max=NULL,type="real-valued")

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 (\(\theta\). in \(f(x,\theta)\)).

min

vector of minimum values of parameters, which passes to "ga" function.

max

vector of maximum values of parameters, which passes to "ga" function.

type

the type of genetic algorithm to be run, which passes to "ga" function.

Value

list of parameter estimates.

Details

Note that due to using genetic algorithm method, this function is mor efficient than nl.lmsNM, but estimator due to non uniqueness of minimum of objective function is not efficient, but is high breakdown estimate.

References

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

See Also

nl.lmsNM, nlr.control, nlr

Examples

Run this code
# NOT RUN {
  # chicken data fitt example
  data=list(xr=Weights$Date,yr=Weights$Weight)
  fit<- nl.lmsGA(nlrobj1[[14]],data=data,start=list(p1=100,p2=42,p3=.11))
# }

Run the code above in your browser using DataLab