Hi, I am trying to fit a non-linear model for a parasite dataset. Initially, I tried log-transforming the data and conducting a 2-way ANCOVA, and found that the equal variance of populations and normality assumptions were violated. Gaba et al. (2005) suggests that the Weibull Distribution is best for highly aggregated parasite distributions, and performs better (lower type 1 and 2 error rates) than models using normal (with log-transformed data) and negative binomial error structure. I have looked at the R help site and had no success in conducting the analysis, so I had no choice but to turn to the R masters. The dependent variable is coccidiaopg (a fecal egg count) and the independent variables are age (continuous), year (continous), sex (2 level factor), and season (2 level factor). The variable sex is a nested factor in season due to the fact that different individuals were sampled during the different seasons. I may need to talk with a local statistician, but if it is simple for someone to help with the code to execute this analysis in R, I would be very greatful. Also, I am unsure how to estimate the starting parameters for shape and scale. Thank you. Best, Daniel Eacker -- View this message in context: http://n4.nabble.com/Non-linear-Weibull-model-for-aggregated-parasite-data-tp962780p962780.html Sent from the R help mailing list archive at Nabble.com.
Terry Therneau
2009-Dec-14 14:37 UTC
[R] Non-linear Weibull model for aggregated parasite data
" I am trying to fit a non-linear model for a parasite dataset. Initially, I ... The survreg() function will fit a weibull distribution. It has the further ability to include censored data, a facility you don't need. library(survival) fit <- survreg(Surv(coccidiaopg) ~ age + year + sex*season, data=... One day I should update it so that if there is no censoring then the Surv() wrapper is not required. Also, see the examples in the ?survreg documentation for comments on shape and scale. This routine uses a location-scale parameterization which is different than rweibull. Terry Therneau