Future prediction

38 views
Skip to first unread message

alessandro dalla bona

unread,
Nov 8, 2022, 11:53:33 AM11/8/22
to R-inla discussion group
HI everyone! 
I fitted a spatio temporal model (spde approach + AR(1)) with pollution data: the data I used are daily detections of PM10 from 49 stations accross a region for 90 days. My goal is to make a prediction from 91-th to 100-th day to compare it with real data. 
I am not sure how to do it, so far I could'nt with the predict() funciton and if it's even possible.
Thank you very much,
Alessandro

Finn Lindgren

unread,
Nov 8, 2022, 12:00:36 PM11/8/22
to alessandro dalla bona, R-inla discussion group
Hi,
You need to make sure your model goes to 100 days, and not just to 91
days, i.e. ngroup = 100.

Are you using plain INLA or inlabru? inlabru has a predict() function
that internally uses posterior sampling.
But you can also extract the posterior distribution summaries for
individual model components from $summary.random$... if you've set up
the model size correctly.

Finn
> --
> 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/6950a926-509c-40fe-9041-e57d341bdbfcn%40googlegroups.com.



--
Finn Lindgren
email: finn.l...@gmail.com

alessandro dalla bona

unread,
Nov 8, 2022, 12:09:42 PM11/8/22
to Finn Lindgren, R-inla discussion group
I’m usino inlabru, I already did some predictions but on ‘used’ days. 
Thank you very much!

alessandro dalla bona

unread,
Nov 9, 2022, 9:55:14 AM11/9/22
to R-inla discussion group
I am sorry to bother, but how can I set the n.groups in inlabru? I don't usually right it directly, since it's somehow encoded automatically by the function.
Thnaks again
Alessandro

Finn Lindgren

unread,
Nov 9, 2022, 12:08:19 PM11/9/22
to R-inla discussion group
For the most part, the same way as in plain inla. The component
definitions take an ngroup argument, but generally it depends on how
you do the definition of the AR(1) part of the model.
If ngroup is given it will default to an indexing mapper over 1, 2, 3,
..., ngroup.

Finn

On Wed, 9 Nov 2022 at 14:55, alessandro dalla bona
> To view this discussion on the web, visit https://groups.google.com/d/msgid/r-inla-discussion-group/331715f5-d621-487f-8759-b532be1d7970n%40googlegroups.com.

Finn Lindgren

unread,
Nov 9, 2022, 12:10:21 PM11/9/22
to R-inla discussion group
The
?inlabru::component
help text may help a bit, as well as
https://inlabru-org.github.io/inlabru/articles/component.html

Finn
Reply all
Reply to author
Forward
0 new messages