Estimation of Nonlinear Regression Parameters with CRS4HC

Share:

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. Algorithm is described in Tvrdík et al. (2007).

Usage

1
crs4hc(formula, data, a, b, N, my_eps, 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_eps

(optional) is used for stopping condition. Default value is 1e-15.

max_evals

(optional) is used for stopping condition, specifies maximum number of objective function evaluations per dimension (dimension=nonlinear model parameter). Default value 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

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ík, J., Křivý, I., and Mišík, L. Adaptive Population-based search: Application to Estimation of Nonlinear Regression Parameters. Computational Statistics and Data Analysis 52 (2007), 713–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 <- crs4hc(y ~ b1 * (1-exp(-b2*x)), df, lowerBounds, upperBounds)
mod

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.