[R] glm package - Negative binomial regression model - Error
paulaveronica at gmail.com
Mon Feb 26 02:07:24 CET 2018
I am running this model in negative binomial regression, using glm.
I had no problems with running the model with a set of data, but now that
i'm trying to run if for new one. I always have this same error when
running the regression:
> #Run Regression
> out<- glm(cbind(influenza, n_sample) ~ x, family=quasibinomial,
Error in `$<-.data.frame`(`*tmp*`, prop, value = c(0.0486530542835839, :
replacement has 208 rows, data has 365
> obs<-aggregate(d$prop, by = list(d$month_week), FUN=summary)
> pred<-aggregate(d$n_p1, by = list(d$month_week), FUN=summary)
By the way, I previously prepared the data set and defined that:
But I still don't understand why it keeps saying that dataframe has less
replacements than rows.
Could anybody help me with this?
[[alternative HTML version deleted]]
More information about the R-help