Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205423

How to properly fit a four parameter self-starting function on nls model

$
0
0
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.


Viewing all articles
Browse latest Browse all 205423

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>