
Explore logistic regression concepts with Stata, including odds, odds ratios, probabilities, and goodness-of-fit. Learn theory and practical application, variable selection, model validity, residual analysis, and graphical and non graphical methods.
Explore logistic regression with stata by building and interpreting a two-by-two contingency table for a binary outcome, comparing withdrawal vs finish across engineering and business students.
Learn how to compute odds from withdrawal probabilities using the probability divided by one minus probability formula in a two-by-two table, with engineering and business examples (0.6 vs 0.25).
Compute and interpret the odds ratio to compare withdrawal odds between engineering and business students, showing engineers have 4.5 times higher odds, and explain when the odds ratio equals 1.
Explore calculating probabilities, odds, and odds ratios for sophomores, juniors, and seniors in a two-by-three table, and introduce logistic regression for multivariable analysis.
Learn how logistic regression analyzes a binary outcome, interprets coefficients through odds and odds ratios, and applies a single independent variable with the withdrawal example.
Explore how logistic regression interprets changes in odds using the coefficient a and e^a. Use heart problem and grades examples to read odds, odds ratios, and probabilities from the model.
Learn how to model binary variables in logistic regression by coding gender as 0/1, interpret coefficients via odds and odds ratios, and compare female to male withdrawal odds.
Interpret logistic regression coefficients with binary and continuous predictors in a model with multiple independent variables. Compute odds and odds ratios using the exponent of the coefficients.
Encode a multicategory variable in logistic regression with two binary indicators and a reference group; exponentiate coefficients to obtain odds ratios comparing each group to the reference.
Explore testing nonlinearity in logistic regression with graphical and box tests, using a visit times log(visit) term and a 0.05 p-value threshold to assess linearity with the logit.
Use graphical tests to assess nonlinearity in logistic regression by inspecting a lowess curve and converting continuous variables into categories to test slope linearity, and consider quadratic terms if needed.
Explore predicting probabilities in logistic regression by estimating the event likelihood for each observation and plotting predicted probability against GPA to interpret withdrawal risk.
Learn how the likelihood ratio test assesses logistic regression model fit by comparing a model with predictors to a constant model, using p-values to determine significance.
Explore the Hosmer-Lemeshow test for logistic regression, which partitions data into about ten groups and compares observed versus fitted values to assess model fit via p-values.
Explore how classification tables assess logistic regression by using predicted probabilities, choosing cut-off values, and balancing sensitivity, specificity, and the ideal p value where sensitivity equals specificity.
Learn to assess model goodness of fit with roc analysis by computing area under the curve. Use the thresholds to gauge discrimination: 0.5 no; 0.17–0.8 acceptable; 0.18–0.9 excellent; ≥0.9 outstanding.
Analyze residuals in logistic regression, including standardized, deviance, and delta x residuals, and plot them against predicted probability to spot potential data issues and influential observations.
Explore how influential observations and residuals shape logistic regression results, assess using deviance residuals, diagonal and delta influence statistics, visualize with plots against predicted probabilities.
Explore logistic regression in Stata by loading the logistic_project.dta dataset, examining withdrawal as the dependent variable and key predictors like gender, GPA, college, semester, and level, starting with single-variable models.
Explore the relationship between GPA, a continuous variable, and course withdrawal using logistic regression in Stata, interpreting odds ratios and coefficients from the output.
Use the non-graphical box test with GPA and GPA times log GPA to assess linearity, and interpret p<0.05 as evidence of nonlinearity.
Assess linearity in a logistic model with graphical methods in Stata, using lowess smoothing and margins plots on categorized GPA to reveal nonlinearity and suggest a quadratic term.
Learn how to model non-linearity in logistic regression by using an interaction term for GPA; avoid the incorrect quadratic variable approach and interpret margins correctly.
Explore binary variables in logistic regression with stata by analyzing gender and college through tabulate, percent calculations, and odds ratios, highlighting significant differences in withdrawal.
Explore using non-binary categorical variables in logistic regression with Stata, interpreting odds ratios and p-values, and collapsing levels by recoding or creating a spring variable.
Collapse and compare categorical levels in logistic regression using Stata, examining 200 and 500 level courses against remedial, interpreting odds of withdrawing and creating a level three variable.
Build a multivariate logistic regression in Stata to predict withdrawal, including GPA with a quadratic term and its interaction, plus gender and collapsed semester and level, and assess model fit.
Apply the likelihood ratio test to assess whether your logistic regression model significantly outperforms a constant-term model, with included variables adding value.
Divide observations into ten groups and compare observed versus fitted values to assess goodness of fit with the Hosmer-Lemeshow test. Interpreting the p-value of 0.56 indicates the model fits well.
Explore goodness of fit using classification tables in logistic regression with Stata, identifying the optimal cut-off probability where sensitivity equals specificity, and quantify correctly classified observations.
Assess the goodness of fit in logistic regression using ROC analysis, interpreting the area under the curve to gauge discrimination, and using the L or C command in Stata.
Assess residuals in logistic regression by examining standardized, deviance, and delta x residuals against predicted probabilities to identify problematic and influential observations.
Identify influential observations in logistic regression by using the head diagonal statistic and the delta better statistic, plotting residuals and probability, and combining results to flag high-influence cases.
Plot delta x residuals against probability with point size weighted by delta x influence to identify observations with high residuals and strong influence.
Explore interpreting logistic regression results and odds ratios, using graphical and non-graphic methods to assess each variable’s effect, with Stata’s post package for categorical data.
Explore non-graphical interpretation of logistic regression results in Stata, using the change command to quantify how GPA and other factors affect withdrawal probabilities and odds ratios.
Learn to visualize how the probability of student withdrawal changes with GPA using margins in Stata, and to compare effects across gender and course level with margins plot.
Visualize how probability changes with multiple variables using margins and margins plot in Stata, comparing GPA effects across course levels and gender, and graph two variables at a time.
Direct learners to further study with applied logistic regression for theory and practice in stata, including goodness-of-fit statistics, and use the post package for categorical data analysis.
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 logistic regression. The theory is explained in an intuitive way. The math is kept to a minimum. The course starts with an introduction to contingency tables, in which students learn how to calculate and interpret the odds and the odds ratios. From there, the course moves on to the topic of logistic regression, where students will learn when and how to use this regression technique. Topics such as model building, prediction, and assessment of model fit are covered. In addition, the course also covers diagnostics by covering the topics of residuals and influential observations.
In the second part of the course, students learn how to apply what they learned using Stata. In this part, students will walk through a large project in order to understand the type of questions that are raised throughout the process, and which commands to use in order to address these questions.