# estimate fixed parameters use data object posneg_data
data(posneg_data)
modpar(posneg_data$age, posneg_data$mass)
# estimate fixed parameters use data object posneg_data (only first
# 4 group levels for example's sake) and specify a fixed hatching
# mass for curve optimization using \code{\link{SSposnegRichards}}
modpar(posneg_data$age, posneg_data$mass)
subdata <- subset(posneg_data,posneg_data$id == as.character(36)
| posneg_data$id == as.character(9)
| posneg_data$id == as.character(32)
| posneg_data$id == as.character(43))
richardsR22.lis <- nlsList(mass ~ SSposnegRichards(age, Asym = Asym,
K = K, Infl = Infl, RAsym = RAsym, Rk = Rk, Ri = Ri,
modno = 22), data = subdata)
# fit a two component model - enter your own data in place of "mydata"
\dontrun{
modpar<-(mydata$x,mydata$y,twocomponent_age=TRUE) # if age of intersection unknown
modpar<-(mydata$x,mydata$y,twocomponent_age=75) # if age of intersection = 75
richardsR1.nls <- nls(y~ SSposnegRichards(x, Asym = Asym, K = K,
Infl = Infl, M = M, RAsym = RAsym, Rk = Rk, Ri = Ri, RM = RM, modno = 1)
, data = mydata)
}
# force an 8 parameter estimate on logistic data
data(logist_data)
modpar<-(logist_data$age,logist_data$mass,force8par=TRUE)
# force an 4 parameter model on logistic data
data(logist_data)
modpar<-(logist_data$age,logist_data$mass,force4par=TRUE)
# troubleshoot the fit of a model
data(posneg_data)
modpar<-(posneg_data$age,posneg_data$mass,verbose=TRUE)
Run the code above in your browser using DataLab