SSexpo: Self-Starting nls exponential model

SSexpoR Documentation

Self-Starting nls exponential model

Description

Computes the exponential function

Usage

SSexpo(input,a,b)

Arguments

input

a numeric vector of values at which to evaluate the model.

a

estimated model parameter

b

estimated model parameter

Value

a numeric vector of the same length as input. It is the value of the expression a*b^x.

Note

This is primarily intended for use in formulae given to the nls function or similar functions for example mle2.

Author(s)

Krzysztof Trajkowski

References

Goryl A., Jedrzejczyk Z., Kukula K. (Eds.), Osiewalski J., Walkosz A. (2004) "Wprowadzenie do ekonometrii w przykladach i zadaniach", Wydawnictwo Naukowe PWN, Warszawa.

Borkowski B., Dudek H., Szczesny W. (2004) "Ekonometria. Wybrane zagadnienia" , Wydawnictwo Naukowe PWN, Warszawa.

See Also

selfStart, getInitial

Examples

x <- 1:20
y <- 0.25*1.54^x+runif(20,0,100)
model <- nls(y ~ SSexpo(x,a,b))
plot(x,y)
p <- coef(model)
curve(SSexpo(x,p[1],p[2]),add=TRUE)

krzysiektr/FitCurve documentation built on Jan. 24, 2025, 1:29 a.m.