Regression Modeling

Poisson Regression | Count Data Analysis on Lattice

Use Poisson regression when you need to understand how different factors influence the number of times an event occurs. Whether you are tracking the number of defects in a production run or the frequency of hospital visits, this method helps you estimate the impact of your variables on event counts.

Understanding Event Rates

Poisson regression is designed for discrete data where the outcome is a count. Unlike linear regression, which assumes a constant rate of change, this method uses a log-link function to ensure that your predicted counts remain positive and logically consistent with the nature of event-based data.

When you have different observation periods—such as monitoring different departments for varying lengths of time—you can include an exposure variable. This converts your result from a raw count to an incidence rate, allowing for fair comparisons across different observation windows.

Diagnostic Checks

A critical part of using this method is verifying the underlying assumptions. Lattice automatically calculates the dispersion ratio by comparing the Pearson chi-square statistic to the degrees of freedom.

If the dispersion ratio is near 1.0, the Poisson model is appropriate. If the ratio is significantly higher, it suggests your data is 'overdispersed,' which can lead to false confidence in your results. In such cases, the tool alerts you so you can pivot to more suitable modeling strategies.

Data Requirements

To run this analysis successfully, your response column must contain only non-negative integers. If the platform detects decimals or negative numbers, it will raise an error, as these are incompatible with standard counting processes.

Additionally, ensure that your dataset is large enough to support the number of predictors you intend to include. For reliable results, having a sufficient number of observations relative to your variables is essential.

1 · Intent → method

An LLM picks regression_poisson from a fixed catalog.

2 · Method → numbers

Deterministic Python engine runs the math. Same input → same output.

3 · Numbers → plain language

A second LLM translates the result into your domain’s vocabulary.

  • What happens if my data has more variance than the average count?

    Poisson regression assumes that the mean and variance are equal. Lattice calculates an overdispersion ratio; if this ratio exceeds 2.0, the model indicates 'severe' overdispersion, and you should switch to a Negative Binomial model to avoid underestimating your error margins.

  • How do I interpret the regression output?

    The model provides an Incidence Rate Ratio (RR). An RR of 1.20 for a predictor means that for every one-unit increase in that variable, the rate of the event is expected to increase by 20%, assuming all other variables in the model are held constant.

Tool input schema

Schema for regression_poisson not exported yet (run pnpm export:registry).