Learn R Programming

nlr (version 0.1-3)

loss.SSQ: Sum of squared loss function.

Description

This function used in nlsnm function to compute the least square estimate using derivative free Nelder-Mead algorithm.

Usage

loss.SSQ(formula, data, start, vm = NULL, rm = NULL, ...)

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.

vm

optional covariance matrix.

rm

optional cholesky decomposition of covariance matrix.

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

Value

result <- list(value = value,correlation=correlation,fmod=fmod)

list values:

value

sum of squared residuals.

correlation

correlation of model

fmod

computed function (transformed by R) contains esponse and or its gradient and hessian predictor and or its gradient & hessian, transformed also by R.

Details

loss.SSQ compute the sum of square of residuals, it is optimized to be used in nlsnm function, since optimization method Nelder-Mead is derivative free the result does not include derivatives.

References

Robust Nonlinear Regression, Theories and Methods with Practical Guides for R Packages. Riazoshams et al.

See Also

nlsnm, nl.robfuncs

Examples

Run this code
# NOT RUN {
## The function is currently defined as
"loss.SSQ"
# }

Run the code above in your browser using DataLab