selfStart
model evaluates the Weibull model for growth
curve data and its gradient. It has an initial
attribute that
will evaluate initial estimates of the parameters Asym
, Drop
,
lrc
, and pwr
for a given set of data.SSweibull(x, Asym, Drop, lrc, pwr)
x
).Asym
to the y
intercept.x
is raised.x
. It is the value of
the expression Asym-Drop*exp(-exp(lrc)*x^pwr)
. If all of
the arguments Asym
, Drop
, lrc
, and pwr
are
names of objects, the gradient matrix with respect to these names is
attached as an attribute named gradient
.SSasymp
model in
that it reduces to SSasymp
when pwr
is unity.nls
, selfStart
, SSasymp
Chick.6 <- subset(ChickWeight, (Chick == 6) & (Time > 0))
SSweibull(Chick.6$Time, 160, 115, -5.5, 2.5) # response only
Asym <- 160; Drop <- 115; lrc <- -5.5; pwr <- 2.5
SSweibull(Chick.6$Time, Asym, Drop, lrc, pwr) # response and gradient
getInitial(weight ~ SSweibull(Time, Asym, Drop, lrc, pwr), data = Chick.6)
## Initial values are in fact the converged values
fm1 <- nls(weight ~ SSweibull(Time, Asym, Drop, lrc, pwr), data = Chick.6)
summary(fm1)
Run the code above in your browser using DataLab