crs4hce: Estimation of Nonlinear Regression Parameters with CRS4HCe

Description Usage Arguments Details Value References Examples

View source: R/code.R

Description

This function estimates the regression coefficients of a nonlinear regression function using least squares. The minimization is performed by the CRS algorithm with four competing local heuristics and adaptive stopping condition. Algorithm is described in Tvrd<c3><ad>k et al. (2007).

Usage

1
crs4hce(formula, data , a, b, N, my_eps0, gamma, max_evals, delta, w0)

Arguments

formula

(obligatory) a nonlinear formula including variables and parameters

data

(obligatory) data frame in which to evaluate the variables in formula

a

(obligatory) a vector of length equal to number of parameters representing lower bounds of search space (bounds for parameters must be specified in the same order they appear on right-hand side of formula)

b

(obligatory) a vector of length equal to number of parameters representing upper bounds of search space (bounds for parameters must be specified in the same order they appear on right-hand side of formula)

N

(optional) size of population. Default value is 10*length(a).

my_eps0

(optional) is used for adaptation of stopping condition. Default value is 1e-9.

gamma

(optional) is used for adaptation of stopping condition. Default value is 1e7.

max_evals

(optional) is used for stopping condition, specifies maximum number of objective function evaluations per dimension (dimension=nonlinear model parameter). Default values is 40000.

delta

(optional) controls the competition of local heuristics. Default value is 0.05. delta > 0.

w0

(optional) controls the competition of local heuristics. Default value is 0.5. w0 > 0.

Details

It<c2><b4>s recommended to modify values of my_eps0 and gamma together. There are implemented methods for generic functions print, summary, plot.

Value

An S3 object of class crs4hc. This object is a list of:

model

a list of two items, includes estimates of nonlinear model parameters and minimal residual sum of squares

algorithmInfo

a list of three items with some internal info about algorithm run

data

a data frame that was passed to function as the data argument

other

a list of four items which include info about nonlinear model formula

References

Tvrd<c3><ad>k, J., K<c5><99>iv<c3><bd>, I., and Mi<c5><a1><c3><ad>k, L. Adaptive Population-based search: Application to Estimation of Nonlinear Regression Parameters. Computational Statistics and Data Analysis 52 (2007), 713<e2><80><93>724. Preprint URL http://www1.osu.cz/~tvrdik/wp-content/uploads/CSDA-06SAS03e.pdf

Examples

1
2
3
4
5
6
7
x <- c(1,2,3,5,7,10)
y <- c(109,149,149,191,213,224)
df <- data.frame(x=x, y=y)
lowerBounds <- c(1, 0.1)
upperBounds <- c(1000, 2)
mod <- crs4hce(y ~ b1 * (1-exp(-b2*x)), df, lowerBounds, upperBounds)
mod

crsnls documentation built on May 30, 2017, 4:21 a.m.

Search within the crsnls package
Search all R packages, documentation and source code