ZTP Regression Predictions

Introduction

We describe the use of Poisson worksheet functions to make predictions based on the Zero-Truncated Poisson (ZTP) regression models described in Creating a ZTP Regression Model using Solver.

Predictions

The Zero Truncated Poisson Regression option of the Poisson Regression data analysis tool provides the predictions for the X values in the original data, as shown on the right side of Figure 4 in Creating ZTP Regression Models using Solver.

You can also use the PoissonPredC and PoissonPredCC functions, as described in Poisson Regression Predictions, to make predictions based on a ZTP regression model.

Example

We now give some predictions based on the ZTP regression model in Example 1 of Creating ZTP Regression Models using Solver. The regression coefficients and covariance matrix is duplicated in Figure 1.

ZTP model summary

Figure 1 – ZTP regression coefficients and covariance matrix

We can predict the number of doctors’ visits for patients with the traits shown in range J1:L7 of Figure 2 as shown on the right side of the figure using the array formula

=PoissonPredCC(J2:L7,G3:G6,F10:I13,TRUE)

in range N1:Q7.

ZTP regression model predictions

Figure 2 – ZTP regression predictions

Note that the first three patients are included in the data used to create the ZTP regression model (rows 2, 6, and 8 from Figure 1 of Creating ZTP Regression Models using Solver), and the predictions in Figure 2 match those shown in Figure 4 of that webpage. The last three patients were not included in the data used to create the ZTP regression, and yet we were able to predict their mean number of doctors’ visits.

The output in range N2:N7 could also be generated via the formula

=PoissonPredC(J2:L7,G3:G6)

Probabilities

We can also generate probabilities based on a ZTP regression. E.g. for a 30 year old nonwhite female patient the probability of 0 to 16 doctors’ visits is shown in Figure 3 using the array formula =ZTPProb(U2:W18,G3:G6,X2:X18) in range Z2:Z18.

ZTP regression model probabilities

Figure 3 – ZTP probabilities

Note, for example, that the value in cell Z5 can also be calculated by the formula

=POISSON.DIST(3,N5,FALSE)/(1-EXP(-N5))

Worksheet Function

The Real Statistics Resource Pack provides the following worksheet functions in support of ZTP regression based on the data in the n × k X array Rx, the n × 1 Y array Ry, the k+1 × 1 Rc coefficient array and × 1 frequency (exposure) array Rt. If Rt is omitted it defaults to an array containing all ones. Ry can also take on a single value (default 0), in which case the function treats Ry as an array consisting only of this value.

ZTPProb(Rx, Rc, Ry, Rt): returns an n × 1 array with the predicted probabilities for the profiles described by Rx, Ry, and Ry based on the ZTP regression model defined by Rc.

Examples Workbook

Click here to download the Excel workbook with the examples described on this webpage.

References

Hilbe, J. M. (2014) Modeling count data. Cambridge University Press
https://assets.cambridge.org/97811070/28333/frontmatter/9781107028333_frontmatter.pdf

UCLA (2024) Zero-Truncated Poisson Regression
https://stats.oarc.ucla.edu/stata/dae/zero-truncated-poisson-regression/

Leave a Comment