Displaying 2 results from an estimated 2 matches for "n_p1".
Did you mean:
__p1
2018 Feb 26
2
glm package - Negative binomial regression model - Error
...year),factor2ind(d$month_week))
>
> out<- glm(cbind(influenza, n_sample) ~ x, family=quasibinomial,
> data=d)
>
> d$prop<-out$fitted.values
Error in `$<-.data.frame`(`*tmp*`, prop, value = c(0.0486530542835839, :
replacement has 208 rows, data has 365
> d$n_p1<-d$prop*d$factor*10
>
> 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:
d$factor<-sapply(d$year,f)
> d$...
2018 Feb 26
0
glm package - Negative binomial regression model - Error
...gt; out<- glm(cbind(influenza, n_sample) ~ x, family=quasibinomial,
> > data=d)
> >
> > d$prop<-out$fitted.values
>
> Error in `$<-.data.frame`(`*tmp*`, prop, value = c(0.0486530542835839, :
> replacement has 208 rows, data has 365
>
> > d$n_p1<-d$prop*d$factor*10
> >
> > 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:
> d$factor<...