7
$\begingroup$

In the book Generalized Linear Models with Examples in R - Dunn and Smyth, in Chapter 6.8, it is recommended to use the Pearson estimator of the dispersion - "This makes the Pearson estimator the most robust estimator, in the sense it relies on fewest assumptions. For this reason the glm() function in R uses the Pearson estimator for $\phi$ by default".

However, in the tweedie.profile () function from the tweedie package in R, it is not even given as an option for the dispersion estimation, rather the mean deviance and MLE are suggested (with MLE as default).

What is the reason for that? why would the Pearson estimate will be better when fitting a GLM, but not used when selecting the power parameter of Tweedie distribution?

$\endgroup$
5
  • 1
    $\begingroup$ In don't know much about the Tweedie distribution family and only took a brief look into the documentation (simple pages like Wikipedia). A quick note/response, something that pops up in my mind while reading this matter, is that the Tweedie distribution has no fixed relative relationship $Var(X) \propto f(\mu_X)$ and the function $f(\mu_X)$ depends on other parameters. So maybe that is why Pearson residuals are less appropriate. $\endgroup$ Commented Nov 9, 2022 at 15:19
  • $\begingroup$ Can you elaborate? Maybe I'm missing something but the function is $Var(Y) = \phi \mu^p$, where $p$ is the parameter we run our grid search on and $\phi$ the dispersion which we want to estimate. So given $p$ everything is known and the Pearson residuals can be calculated. The deviance is dependent also on the same parameter $p$ same as the MLE estimate. $\endgroup$
    – Kozolovska
    Commented Nov 9, 2022 at 17:37
  • $\begingroup$ At the moment I can't elaborate too much, but a quick response is that the tweedie package probably does not assume that $p$ is given. If $p$ is given/fixed then you might use glm instead (with a custom family function). $\endgroup$ Commented Nov 9, 2022 at 17:54
  • $\begingroup$ cran.r-project.org/web/packages/tweedie/tweedie.pdf. I meant tweedie.profile() $\endgroup$
    – Kozolovska
    Commented Nov 9, 2022 at 21:23
  • $\begingroup$ I don't see a direct reason in the documentation but there is mention of some articles. I will read them if I find time as I find this topic interesting and maybe I might contribute something more useful some other time. For the moment I believe that estimating dispersion for Tweedie distributions might be more difficult because estimates of the 'power 'and the 'dispersion' are linked in the likelihood and not independent from each other. Note that for GLM models the estimate of the dispersion is independent from fitting the rest of the model. $\endgroup$ Commented Nov 9, 2022 at 22:46

1 Answer 1

9
$\begingroup$

Tweedie generalized linear models assume a mean-variance relationship with variance power $p$, defined by $$E(y_i)=\mu_i$$ and $${\rm var}(y_i)=\phi \mu_i^p$$ where $y_i$ is the $i$th observation, $\mu_i$ is the expected value, $\phi$ is the dispersion and $p$ is the mean-variance power parameter, also called the Tweedie index parameter.

The purpose of the tweedie.profile function is to estimate $p$ by profile maximum likelihood. The dispersion $\phi$ is a nuisance parameter in the profile likelihood, as are the glm regression coefficients. It is a requirement of the profile likelihood method in statistics that all nuisance parameters be set to their maximum likelihood estimates. It would be invalid to use the Pearson estimator for $\phi$ is this context because then the resulting likelihood for $p$ would not be a profile likelihood and differences in log-likelihoods would not have their usual meaning.

We recommend that you use tweedie.profile to guide your choice of the Tweedie index parameter. Then you can fit a generalized linear model treating $p$ as a known parameter, for example by:

library(statmod)
fit <- glm(y~x, family=tweedie(var.power=p, link.power=0))
summary(fit)

In the above code, the summary function in R will by default use the Pearson estimator for $\phi$. The use of the Pearson estimator is not specific to Tweedie distributions, but is a generic property of the summary.glm function in R. The fact that tweedie.profile and summary.glm use different estimators for $\phi$ does not cause any problems for the process.

As hinted at in Section 6.8 of our book (Dunn & Smyth, 2018), I would ideally prefer to use modified profile likelihood for both $p$ and $\phi$, but that is difficult to implement. The above process is much simpler and will still give good results.

I see that I answered a related question from another poster 3 years ago: GLM Tweedie dispersion parameter.

Reference

Dunn PK, Smyth GK (2018). Generalized linear models with examples in R. Springer, New York, NY.

$\endgroup$
4
  • $\begingroup$ Thank you for your answer. So in that context you also do not recommend using the saddlepoint estimator of the dispersion in tweedie.profile? Or it can be used since it also yields the same interpretation for the difference in log-likelihoods? $\endgroup$
    – Kozolovska
    Commented Nov 10, 2022 at 6:59
  • 2
    $\begingroup$ @Kozolovska The saddlepoint is an approximation to the likelihood so the saddlepoint method is a variation on the maximum likelihood method rather than an independent method. The saddlepoint approximation is fast to compute but it will be innaccurate for observations where the mean is very small or the dispersion is large. If computing the full likelihood is practical then it is always preferable. $\endgroup$ Commented Nov 10, 2022 at 7:41
  • $\begingroup$ So the saddlepoint dispersion estimate (mean deviance) is only to be paired with saddle point approximation of the likelihood and not for example with the inversion method of likelihood estimation? or can you mix and match since they all maximize likelihood? $\endgroup$
    – Kozolovska
    Commented Nov 10, 2022 at 8:06
  • 1
    $\begingroup$ @Kozolovska I think you are misunderstanding the process. We are not matching anything with anything. If you compute the approximate (saddlepoint) likelihood, then you will maximize the approximate likelihood and get the corresponding approximate mle parameter estimates. If you compute the exact likelihood, then you will maximize the exact likelihood and get the corresponding exact mle parameter estimates. $\endgroup$ Commented Nov 10, 2022 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.