Hi
I think your issue is that the variance for data y from the tweedie, scales like
(see inla.doc("tweedie"))
mu^p
where 1 < p < 2
so you if you scale data y by 'a', then you would expect var(y) to scale with
a^2 and the mean with 'a', but for the tweedie model the variance scales with
a^p, where p<2, and by default p is estimated from data. so unless you fix (or
estimate) p close to 2, the results will not be invariant to scale.
this is not an error but a feature of the model.
you may also check that the other prior does not depend on this scaling, but I
guess the above is the main reason
Best
Havard
On Fri, 2025-10-24 at 18:03 -0700, Marcelo Soeth wrote:
> Dear members,
> I’m relatively new to INLA and am fitting spatial models with the Tweedie
> family using INLA / inlabru / INLAspacetime. I’ve found that changing only the
> units of the response (kilograms vs tonnes) leads to noticeably different
> posterior predictions, whereas Gaussian models give nearly identical
> predictions after rescaling.
> I’m trying to understand whether this Tweedie behaviour is due to the
> mean–variance relationship (parameters p and φ), prior/parameterization
> choices, or something about how predictions are formed on the response scale
> (e.g., using ~ exp(…) vs a family-provided inverse link).
> Attached is a minimal, reproducible example.
> What I observe
> * Tweedie: predictions from the kg fit and the tonnes fit (converted ×1000 to
> kg) do not align; correlations are < 1 and there are systematic differences.
> * Gaussian: predictions do align closely between kg vs tonnes (after ×1000),
> consistent with scale invariance of a linear/identity link model.
>
> What I’ve tried
> * Same model structure across units: spatial field via barrierModel.define +
> single fsbt effect.
> * Matching priors as best I can across unit systems; also tested several
> alternative priors.
>
> Questions
> 1. Is it expected/theoretically correct that Tweedie predictions are
> sensitive to the response scale (kg vs tonnes) in INLA?
> 2. Is ~ exp(…) the recommended way in INLA/inlabru to obtain Tweedie
> response-scale means, analogous to mgcv::predict(type="response")?
> 3. Any guidance on scale-consistent priors (for observation precision in
> Gaussian and for Tweedie hyperparameters) to improve comparability when only
> units change?
>
> Many thanks for any clarification or best-practice advice!
> Best regards,
> Marcelo
> --
> 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, visit
>
https://groups.google.com/d/msgid/r-inla-discussion-group/2cac7148-4b86-4895-ab42-141ab719c6a0n%40googlegroups.com
> .
--
Håvard Rue
he...@r-inla.org