
Explore count data modeling with Stata, learn why linear regression fails for nonnegative integer counts, and apply count model techniques using Stata's commands and visualization tools.
Explore count data and two-by-two count tables in Stata, comparing failure frequencies across business and engineering students while accounting for total courses to assess risk of failure.
Calculate risk by dividing failures by total courses, then compare business and engineering students. Engineering shows higher risk (0.164) than business (0.144), with a ratio-based follow-up.
Compute the incidence rate ratio by dividing the failure risks of business by engineering students, and interpret a value like 0.878 as business failure being 0.878 times the engineering risk.
Explore two-by-three tables in count data modeling with Stata, comparing risk of failure across business, engineering, and life sciences, and computing incidence rate ratios.
Learn the Poisson regression model for count data with a single independent variable, interpret coefficients by exponentiating to obtain incidence rate ratios, and apply to GPA and failed courses examples.
See how count models interpret regression outputs in practice: relate ads to daily customer counts and grades to weekly outings, using incidence rate ratios and exponentiated coefficients.
Learn to include binary variables in regression by coding gender as 0 for male and 1 for female, with the coefficient yielding an incidence rate ratio of 1.64.
Extend count models to multiple independent variables such as GPA and gender, and interpret coefficients as exponentiated effects on the expected count.
The lecture shows how to encode three-category variables with two dummy variables, using engineering as the reference, and interpret exponentiated coefficients as incidence rate ratios.
Explore exposure in count data and align incidence rate ratios with Poisson regression results by including an exposure variable, such as total courses or minutes played.
Explain why the postwar model often underfits count data due to equal mean and variance, and how the negative binomial model with alpha improves fit and tests alpha zero.
Explore truncated models for count data, where the dependent variable cannot be zero. Learn zero-truncated and other truncations and use truncated Warsaw or truncated negative binomial models.
Explore zero-inflated models for count data with excess zeros, combining a binary inflation model with a count model to explain why zeros occur and predict counts.
Compare count data models in Stata, such as Poisson, negative binomial, and zero-inflated variants, by plotting observed versus predicted counts and using likelihood ratio tests and AIC/BIC.
Explore choosing count models like negative binomial and zero-inflated models, avoid truncated models, and predict the number of events, illustrating with GPA versus predicted event counts.
Use count models to predict the probability of an event occurring a specific number of times, such as zero, one, or four failures, and visualize how GPA affects these probabilities.
Explore count data analysis in Stata using the Count project dataset, with 760 observations and seven variables, and install the post package to model total fail.
Examine total failed courses with a histogram, noting zeros and not truncated, and reveal GPA and English relationships via scatter plots with loess smoothing and exposure-adjusted incidence rate modeling.
Explore binary variables like college and gender in stata, using the i dot prefix and incidence rate ratios to compare groups, interpret exposure, and understand total failed courses.
Engage in a multivariate count data analysis in Stata by including multiple predictors (GPA, English, college, gender), using exposure and incidence rate ratios to interpret total failed outcomes.
Assess overdispersion and fit a negative binomial regression in Stata, using a likelihood ratio test against Poisson, to show alpha is significant and favor the negative binomial model.
Explore zero-inflated negative binomial modeling in stata, comparing to standard nb, and interpret count and inflation parts, with gpa as a key inflation predictor and exposure control.
Explore interpreting the predicted number of failed courses using a zero inflated negative binomial model, and quantify GPA, English, college, and gender effects in Stata with change and delta commands.
Explore modeling count data in Stata by deriving predicted probabilities of failing 0–5 courses, comparing gender and GPA scenarios using the table and change commands.
Visualize how the predicted number of events changes with GPA from 60 to 100 using margins and margins plot in Stata, via M change and M table commands.
Visualize predicted probabilities for count outcomes in Stata with margins and the predict option, varying GPA from 60 to 100 to compare failing three vs zero courses across genders.
Conclude the course by reviewing count data modeling in Stata, covering regression, negative binomial and zero-inflated and truncated models, and applying concepts through a project.
Included in this course is an e-book and a set of slides. The course is divided into two parts. In the first part, students are introduced to the theory behind count models. The theory is explained in an intuitive way while keeping the math at a minimum. The course starts with an introduction to count tables, where students learn how to calculate the incidence-rate ratio. From there, the course moves on to Poisson regression where students learn how to include continuous, binary, and categorical variables. Students are then introduced to the concept of overdispersion and the use of negative binomial models to address this issue. Other count models such as truncated models and zero-inflated models are discussed.
In the second part of the course, students learn how to apply what they have learned using Stata. In this part, students will walk through a large project in order to fit Poisson, negative binomial, and zero-inflated models. The tools used to compare these models are also introduced.