Why Tweedie Fits Need More Than One Residual Check
For a Tweedie model with power \(1<p<2\), a response can be exactly zero or positive and continuous. A residual diagnostic should therefore check both parts of the model: how often zeros occur, and how well the fitted distribution describes positive amounts. A single residual summary can conceal a problem in either part.
The checks here use fitted means, dispersion, and power to compare each observation with its model-based distribution. Their patterns can suggest whether the mean structure, dispersion, or tails need attention, but they do not by themselves prove which component is wrong. In particular, an excess of zeros can arise from several forms of model misfit.
Randomized Quantile Residuals
For a continuous response, a probability-integral-transform (PIT) residual applies the fitted CDF to the observation, then transforms that probability to a standard normal scale. A Tweedie response is not entirely continuous: at zero, the CDF jumps from zero to the zero probability. Randomization within this jump gives the corresponding residual construction.
If the distributional parameters are known and the model is correct, these residuals are standard normal in distribution. This is an exact calibration result, not a claim that residuals calculated using estimated parameters are independent standard normal observations. Estimation makes fitted residuals dependent and can make their spread look too small. Residual plots are therefore diagnostic summaries; formal calibration can use simulations from the fitted model with the model refitted in each simulated data set.
Worked Example: Randomizing a Zero and Transforming a Positive Observation
Suppose the fitted zero probability for one observation is \(\hat{q}=0.20\), and the observed response is zero. If the random draw is \(V=0.50\), then \(U=V\hat{q}=0.50(0.20)=0.10\). Thus \(r=\Phi^{-1}(0.10)\approx -1.282\). A different random draw would give a different residual for this same zero, reflecting the fact that zero corresponds to an interval of CDF probability rather than a single point.
For a positive observation, suppose the fitted CDF at its observed value is \(0.8413\). There is no jump at that value, so \(U=0.8413\), giving \(r=\Phi^{-1}(0.8413)\approx 1.00\). In both cases the residual is on the standard normal scale, but its construction respects the response distribution.
Proof. Write \(q=P(Y_i=0)\) and \(F\) for the true CDF. For \(0\leq t\leq q\), only an observation equal to zero can produce \(U_i\leq t\). Conditional on zero, \(U_i=V_iq\), so \(P(U_i\leq t)=qP(V_i\leq t/q)=q(t/q)=t\). For \(q<t\leq1\), the zero outcome contributes probability \(q\). The positive outcomes contribute \(P(0<Y_i,\ F(Y_i)\leq t)=t-q\), because the conditional positive CDF is continuous and its PIT is uniform on the interval from \(q\) to \(1\). Therefore \(P(U_i\leq t)=q+(t-q)=t\). The standard normal quantile transformation then gives \(P(r_i\leq x)=P(U_i\leq\Phi(x))=\Phi(x)\) for every real \(x\). \(\square\)
Check Whether the Model Predicts the Right Number of Zeros
For a Tweedie model with \(1<p<2\), the compound Poisson representation gives a direct zero-probability check. Its Poisson count has mean \(\lambda=\mu^{2-p}/\{\phi(2-p)\}\); the response is zero exactly when that count is zero. Thus \(P(Y=0)=\exp\{-\mu^{2-p}/[\phi(2-p)]\}\). For observation \(i\), use its fitted values to obtain \(\hat{q}_i\). The observed and expected numbers of zeros are \(O_0=\sum_i I(Y_i=0)\) and \(E_0=\sum_i\hat{q}_i\), respectively.
Derivation. Each indicator \(I(Y_i=0)\) is Bernoulli with success probability \(q_i\), so its expectation is \(q_i\) and variance is \(q_i(1-q_i)\). Linearity of expectation gives \(E[O_0]=\sum_iq_i\). Independence makes the covariances between distinct indicators zero, so \(\operatorname{Var}(O_0)=\sum_i\operatorname{Var}\{I(Y_i=0)\}=\sum_iq_i(1-q_i)\). This gives a scale for an observed-minus-expected zero count. With fitted probabilities, however, parameters are estimated; this variance is not an exact reference distribution for the resulting discrepancy. \(\square\)
Worked Example: Comparing Observed and Expected Zero Counts
Suppose 100 independent observations have the same fitted zero probability, \(\hat{q}_i=0.20\). The expected zero count is \(E_0=100(0.20)=20\). The known-probability variance calculation gives \(100(0.20)(0.80)=16\), with standard deviation \(4\). If 29 zeros are observed, the simple standardized difference is \((29-20)/4=2.25\).
This is a useful warning signal: the fitted model predicts fewer zeros than were observed. It is not an exact \(z\)-test for a fitted model, because the probability was estimated and the observations may have influenced that estimate. A more appropriate calibration, especially for a formal assessment, simulates data under the fitted model and refits it before comparing zero-count discrepancies.
A zero-count discrepancy alone does not tell which parameter or model component is responsible. Since \(\hat{q}_i\) depends on \(\hat{\mu}_i\), \(\hat{\phi}\), and \(\hat{p}\), a poor mean fit, dispersion fit, or power choice can change the predicted zero frequency. Examine the discrepancy alongside the covariates and fitted means rather than interpreting it in isolation.
Inspect Positive Outcomes Separately
To focus on the positive amounts, use the fitted conditional CDF \(H_i(y)=P(Y_i\leq y\mid Y_i>0)=[\hat{F}_i(y)-\hat{q}_i]/(1-\hat{q}_i)\), for \(y>0\). It removes the zero atom and maps the positive part of the fitted distribution to probabilities between zero and one. For an observed positive \(Y_i\), the conditional PIT is \(H_i(Y_i)\); its normal-scale version is \(\Phi^{-1}\{H_i(Y_i)\}\).
Proof. Given \(Y_i>0\), the CDF of the positive response is \(H_i\), which is continuous by assumption. For any \(t\in(0,1)\), continuity of this CDF implies \(P\{H_i(Y_i)\leq t\mid Y_i>0\}=t\), the probability-integral-transform property for a continuous distribution. Hence the conditional PIT is uniform. Applying \(\Phi^{-1}\) gives a standard normal conditional residual. \(\square\)
Worked Example: Reading Conditional Positive Residuals
Suppose five observed positive outcomes have conditional PIT values \(0.05,\ 0.20,\ 0.50,\ 0.80,\ 0.95\) under their respective fitted distributions. Their normal-scale conditional residuals are approximately \(-1.645,\ -0.842,\ 0,\ 0.842,\ 1.645\). The values are balanced around zero in this small illustration, with two in each tail and one at the center.
Now suppose instead the positive-outcome PIT values are \(0.60,\ 0.70,\ 0.80,\ 0.90,\ 0.95\). Their normal-scale residuals are approximately \(0.253,\ 0.524,\ 0.842,\ 1.282,\ 1.645\), all positive. Such a pattern suggests that positive observations tend to exceed what their fitted conditional distributions predict. A systematic shift can indicate mean misfit; a spread or tail discrepancy after centering can indicate dispersion or tail misfit. Five observations are far too few for a firm conclusion, and patterns should be checked against fitted values and covariates.
Distinguishing Mean, Dispersion, and Tail Misfit
Randomized quantile residuals are useful for checking the overall distributional fit. Plot them against fitted means and important predictors, and examine their center, spread, and tails. A persistent positive or negative trend across fitted means or a predictor suggests a mean-structure problem: the model systematically predicts too little or too much in that part of the data. An approximately centered pattern with too much or too little spread suggests a dispersion problem. Excessive extreme residuals relative to a calibrated reference can indicate tail misfit.
Use the zero-count check and conditional positive residuals to refine that diagnosis. An excess of zeros paired with positive residuals that otherwise look well calibrated points toward trouble in the zero probability, though mean, dispersion, or power misspecification can still be the underlying cause. If zero frequencies are reasonable but conditional positive residuals show a shift, suspect the fitted positive amounts or mean structure. If their center is reasonable but their spread or extremes are not, inspect dispersion and tail behavior.
Look for location or spread changes against fitted means and predictors, and compare extreme residuals with a suitable reference.
Calculate the fitted expected number of zeros and identify whether the discrepancy is large relative to its variability and simulation-based calibration.
Use their location, spread, and tails to see whether positive amounts are also poorly described, independently of the zero atom.
These are diagnostic clues, not a mechanical classification rule. For example, a predictor-dependent mean error can change both the zero probability and the positive amounts, while a wrong dispersion can affect both zero frequency and positive spread. A common mistake is to treat a normal-looking randomized quantile residual plot as proof that every part of the model is correct. The correction is to assess the zero frequency and positive conditional distribution explicitly, account for parameter estimation, and interpret the checks together.
Check Your Understanding
Use the definitions and checks in this tutorial to answer the following.
- Why does an observed zero require randomization when constructing a quantile residual for a Tweedie response?
- For fitted zero probabilities \(0.10,\ 0.20,\ 0.30\), what is the expected number of zeros across the three observations?
- What does a conditional positive PIT value close to one indicate about an observed positive outcome relative to its fitted conditional distribution?
- Why is the known-probability variance formula for a zero count not an exact calibration after fitting the model?
- Give one possible interpretation of centered positive residuals with heavier-than-expected tails, and explain why it is not a definitive diagnosis.