bgev prediction

104 views
Skip to first unread message

TheCorinna1994

unread,
Sep 19, 2023, 7:43:52 AM9/19/23
to R-inla discussion group
Dear all,

I want to model maximum precipitation with the bgev distribution. The data from the monitoring stations looks like this:monitoring stations max precip.png but if I do the same plot after the prediction step with INLA I only get a scale from 0-40 posterior.png. According to inla.doc("bgev") there is no inverse function, which I need to apply for the predictor hence I compute 
summary_lp_bgev_early<-result4_max_early.pred$summary.linear.predictor[index_early,"mean"]. 

Do you have any idea what I do wrong?

All the best,
Corinna

Finn Lindgren

unread,
Sep 19, 2023, 9:39:29 AM9/19/23
to R-inla discussion group
Hi Corinna,

the observed value will usually have more variability than the posterior mean of the location parameter for the observation model.

For example:
Take a simpler case, with a predictor \eta_i observed with additive Gaussian noise, to get y_i = \eta_i + \epsilon_i, where \epsilon_i ~ N(0, \sigma^2)
Then even if we could perfectly estimate \eta_i, then the spread of values would be smaller than for y_i, because of the contribution from the \epsilon_i.

This is also the case for the bgev distribution model, and virtually _every_ observation model; furthermore, generally in spatial statistics when there's a Gaussian field involved in the model for \eta, the posterior mean for \eta will be fundamentally smoother across space than the observations, and have smaller variability.

The quetion I think you need to consider is instead whether the posterior predictive distribution for y_i resembles the observed values.
In the Gaussian case, one can simply add&subtract a quantile of the \epsilon-distribution, but for bgev I assume it would involve either posterior sampling on the data level, or some quantile calculations.  Posterior predictive sampling is the most general approach, as it allows any type of model. 

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/88787f3c-c35f-48a8-9cbc-25275f4cbacdn%40googlegroups.com.


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

TheCorinna1994

unread,
Sep 26, 2023, 8:59:33 AM9/26/23
to R-inla discussion group
Hi Finn,

I have one final question though: when i draw monte carlo samples with inla.posterior.sample from the bgev distribution and compute the predictor at my unobserved locations and compare them to what I get from including the prediction scenario in the INLA fitting process, how can I relate this to the predictive posterior estimates? Do these histogram give me a good measure on how well my fitting process went?

Sorry for this stupid question but highly appreciate your answer.

Thanks so far for your great anwers.

All the best,
Corinna

monte_carlo_bgev.png

Finn Lindgren

unread,
Sep 26, 2023, 9:41:52 AM9/26/23
to TheCorinna1994, R-inla discussion group
Hi, I'm not entirely sure what the question is, as the "predictive
posterior estimates" on the data level _is_ what you get by using
inla.posterior.sample to sample the latent variables and then from
that sample the data level.

But if you mean how to compare the posterior predictive samples to the
observed sample distribution, then there are several ways, depending
on the specific aspect being investigated (e.g. spatial prediction
would be treated differently to the "overall marginal distribution",
etc).
Might help if you have a more specific question in mind regarding what
aspect of the predictions you want to investigate; leave-site-out
prediction being one possible choice.

I believe there's one or more papers by Aki Vehtari and colleagues
about how to assess posterior predictive samples. (e.g. with
probability integral transform histograms and/or
Kolmogorov-Smirnov-type CDF difference comparisons, etc)

Finn

On Tue, 26 Sept 2023 at 13:59, TheCorinna1994 <corinn...@hotmail.com> wrote:
>
> Hi Finn,
>
> I have one final question though: when i draw monte carlo samples with inla.posterior.sample from the bgev distribution and compute the predictor at my unobserved locations and compare them to what I get from including the prediction scenario in the INLA fitting process, how can I relate this to the predictive posterior estimates? Do these histogram give me a good measure on how well my fitting process went?
>
> Sorry for this stupid question but highly appreciate your answer.
>
> Thanks so far for your great anwers.
>
> All the best,
> Corinna
>
> On Tuesday, 19 September 2023 at 15:39:29 UTC+2 Finn Lindgren wrote:
>>
>> Hi Corinna,
>>
>> the observed value will usually have more variability than the posterior mean of the location parameter for the observation model.
>>
>> For example:
>> Take a simpler case, with a predictor \eta_i observed with additive Gaussian noise, to get y_i = \eta_i + \epsilon_i, where \epsilon_i ~ N(0, \sigma^2)
>> Then even if we could perfectly estimate \eta_i, then the spread of values would be smaller than for y_i, because of the contribution from the \epsilon_i.
>>
>> This is also the case for the bgev distribution model, and virtually _every_ observation model; furthermore, generally in spatial statistics when there's a Gaussian field involved in the model for \eta, the posterior mean for \eta will be fundamentally smoother across space than the observations, and have smaller variability.
>>
>> The quetion I think you need to consider is instead whether the posterior predictive distribution for y_i resembles the observed values.
>> In the Gaussian case, one can simply add&subtract a quantile of the \epsilon-distribution, but for bgev I assume it would involve either posterior sampling on the data level, or some quantile calculations. Posterior predictive sampling is the most general approach, as it allows any type of model.
>>
>> Finn
>>
>> On Tue, 19 Sept 2023 at 12:43, TheCorinna1994 <corinn...@hotmail.com> wrote:
>>>
>>> Dear all,
>>>
>>> I want to model maximum precipitation with the bgev distribution. The data from the monitoring stations looks like this: but if I do the same plot after the prediction step with INLA I only get a scale from 0-40 . According to inla.doc("bgev") there is no inverse function, which I need to apply for the predictor hence I compute
>>> summary_lp_bgev_early<-result4_max_early.pred$summary.linear.predictor[index_early,"mean"].
>>>
>>> Do you have any idea what I do wrong?
>>>
>>> All the best,
>>> Corinna
>>>
>>> --
>>> 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/88787f3c-c35f-48a8-9cbc-25275f4cbacdn%40googlegroups.com.
>>
>>
>>
>> --
>> Finn Lindgren
>> email: finn.l...@gmail.com
>
> --
> 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/1d0594c6-3c84-4f4b-b4cc-35861ebed55en%40googlegroups.com.

TheCorinna1994

unread,
Oct 2, 2023, 5:16:10 AM10/2/23
to R-inla discussion group
Thank you very much Finn!
Reply all
Reply to author
Forward
0 new messages