data <- read.table("c:\\temp\\chicks.txt",header=T)
attach(data)
names(data)
[1] "weight""Time"
model <- nls(weight~SSfpl(Time, a, b, c, d))
xv <- seq(0,22,.2)
yv <- predict(model,list(Time=xv))
plot(weight~Time,pch=21,col="red",bg="green4")
lines(xv,yv,col="navy")
I try to fit the self starting function in nls model. But I have no idea how to create the formula and fit the model. Thank You.
NOTE: The code above is from the The R Book of Michael J. Crawley.