require(graphics)
# calculate y from an 8-parameter model
data(posneg_data)
modpar(posneg_data$age, posneg_data$mass) #create pnmodelparams for fixed parameters
y <- posnegRichards_eqn(10, 1000, 0.5, 25, 1, 100, 0.5, 125,
1, modno = 1)
# calculate y from a 4-parameter positive only model, note that second curve parameters are unneeded
# and replaced with value from pnmodelparams
y <- posnegRichards_eqn(10, 1000, 0.5, 25, 1,
1, modno = 12)
# plot a logistic curve (M=1), note that second curve parameters are unneeded
plot(1:200, posnegRichards_eqn(1:200, 1000, 0.5, 25, 1,
modno = 12), xlim = c(1, 200), xlab = "x",
ylab = "y", pch = 1, cex = 0.7)
Run the code above in your browser using DataLab