Forecasting vaccination coverage

63 views
Skip to first unread message

Samuel Muchiri

unread,
Sep 10, 2021, 3:20:09 AM9/10/21
to R-inla discussion group
Hello all, i have 5 months worth of vaccination data for 47 regions each and i'm trying to forecast the vaccination coverage to the next six months. 
the results show a coverage more than 100% in some of the regions which doesn't make sense. I have also set the forecasted period values to NA. This is a sample of the code.

v_cov1b <- Vacc_any_train  ~ 1 + as.numeric(Week) + as.factor(MnTT2)  + as.numeric(Rural) + as.numeric(Over58) +
  f(Month, model="ar1", hyper = list(theta = list(prior='pc.prec', param=c(1,0.1)))) +
  f(CID, model ="iid") +
  f(Year, model = "iid")


mod.1b <- inla(v_cov1b, 
               family = "poisson", 
               data = Vaccination_cov, 
               E = Pop2, 
               control.inla=list(strategy="laplace", tolerance = 1e-20, h=1e-05),
               control.compute=list(config=TRUE, dic=TRUE, waic=TRUE, mlik = TRUE, cpo=TRUE),
               control.predictor = list(compute = TRUE, link=1),
               quantiles =  c(0.025, 0.05,0.5,0.95, 0.975),
               control.fixed= list(expand.factor.strategy = "inla", 
                                   #mean.intercept = 1, 
                                   prec.intercept = 0.1),
               verbose=TRUE)

summary(mod.1b)

what could be the possible problem?
Thanks in advance.

Helpdesk

unread,
Sep 12, 2021, 7:31:20 AM9/12/21
to Samuel Muchiri, R-inla discussion group

often the poisson is used as an approximation to the binomial, in the
sense that

Poisson(lambda)

is about Binomial(n, prob)

where lambda=n*prob, and if n is high and prob is low, then this is
fine.

I guess your problem is that 'prob' gets higher than one, meaning that
you might want to rewrite the poisson as binomial, hence you'll predict
'prob' which will then assure that prob < 1, hence you do not run into
the problem you described.
> --
> You received this message because you are subscribed to the Google
> Groups "R-inla discussion group" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to r-inla-discussion...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/r-inla-discussion-group/96890246-e39e-4dda-a49e-7792c6715005n%40googlegroups.com
> .

--
Håvard Rue
he...@r-inla.org

Samuel Muchiri

unread,
Sep 13, 2021, 4:27:35 AM9/13/21
to R-inla discussion group
Hello Håvard.

Thanks for your timely response and this has indeed worked and results make sense.

Thanks again.

Samuel Muchiri.
Reply all
Reply to author
Forward
0 new messages