• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Analysis Factor

The Analysis Factor

Statistical Consulting, Resources, and Statistics Workshops for Researchers

  • Home
  • About
    • Our Programs
    • Our Team
    • Our Core Values
    • Our Privacy Policy
    • Employment
    • Guest Instructors
  • Membership
    • Statistically Speaking Membership Program
    • Login
  • Workshops
    • Online Workshops
    • Login
  • Consulting
    • Statistical Consulting Services
    • Login
  • Free Webinars
  • Contact
  • Login

Linear Regression in Stata: Missing Data and the Stories it Might Tell

by Jeff Meyer Leave a Comment

by Jeff Meyer

In a previous post , Using the Same Sample for Different Models in Stata, we examined how to use the same sample when comparing regression models. Using different samples in our models could lead to erroneous conclusions when interpreting results.

But excluding observations can also result in inaccurate results.

The coefficient for the variable “frequent religious attendance” was negative 58 in model 3 and then rose to a positive 6 in model 4 when income was included. If we didn’t control for income we might conclude that frequent religious attendance leads to a lower mental health composite score.

When we controlled for income we noticed that our sample size decreased from 2,067 to 1,683. Using the same 1,683 observations in model 3a that we used in model 4 had a significant impact on the coefficient of the religious attendance variable for model 3.

Note: regression analysis in Stata drops all observations that have a missing value for any one of the variables used in the model. (This is knows as listwise deletion or complete case analysis).

So a person who does not report their income level is included in model_3 but not in model_4.

stata001

Is there a big difference between the 1,683 observations used in model 4 and the 384 observations that were not used in model 4 but were used in model 3?

To examine the differences between the two samples I ran model 3 once more and generated a new variable “in_model_3”.
gen in_model_3=e(sample)

I then created another variable that equals one if the observation is used in model 3 but not in model 4.
gen not_in_model4 =1  if  in_model_3==1  &  in_model_4==0

I made the variable equal zero if the observation is used in both model 3 and model 4.
replace not_in_model4=0  if  in_model_3==1  &  in_model_4==1

I then ran model 3 using the observations not in model 4 (named model_3d) and using the observations used in model 4 (named model_3e).
quietly reg MCS2000  UnemployedWksPastCal2000cont NumberBioStepAdoptChildHH2000 i.Mar_Status high_rel_attend if  not_in_model4 ==1
estimates store model_3d

quietly reg MCS2000  UnemployedWksPastCal2000cont NumberBioStepAdoptChildHH2000 i.Mar_Status high_rel_attend if  not_in_model4 ==0
estimates store model_3e

The results are:

stata002

People who don’t report their income level have an average 347 point lower mental health composite score than those who report their income. How do we interpret this?

Let’s check out the summary table for MCS subdivided by whether the observation is in model 4 (not_in_model4).

stata003

The difference in means between the two groups is 139, much smaller than the difference in the coefficients in model 3 and model 3a of 347.

Something that looks odd is the “minimum” value of negative 2. It’s not possible for the mental composite score to be negative.

These observations need to be treated as missing data.

We’ll change the observations with -2 for MCS to missing. Stata uses “.” (the period) for missing data.
replace MCS2000=. if MCS2000==-2

The two groups are now more similar. A two group t-test confirms there is not a significant difference between the means of the two groups.

stata004

Now rerun the models:

stata005

The difference between the coefficients for religious attendance is still significantly different. But it has decreased from 347 to 286 as a result of eliminating the 13 observations with a value of -2.

What else might be influencing the difference in coefficients? Does the manner in which frequent religious attendance is defined (3 or more times per month) affect the outcome?

Survey researchers generally agree that people with low income are less likely to answer a survey question regarding their income level.  Is that impacting the results?

Is there another variable that we are not controlling for that is affecting the results?

What story might these missing data tell?

Jeff Meyer is a statistical consultant with The Analysis Factor, a stats mentor for Statistically Speaking membership, and a workshop instructor. Read more about Jeff here.

Four Critical Steps in Building Linear Regression Models
While you’re worrying about which predictors to enter, you might be missing issues that have a big impact your analysis. This training will help you achieve more accurate results and a less-frustrating model building experience.

Tagged With: coefficients, linear regression, Missing Data, model, Stata

Related Posts

  • Missing Data Diagnosis in Stata: Investigating Missing Data in Regression Models
  • Using the Same Sample for Different Models in Stata
  • Same Statistical Models, Different (and Confusing) Output Terms
  • Incorporating Graphs in Regression Diagnostics with Stata

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Please note that, due to the large number of comments submitted, any questions on problems related to a personal study/project will not be answered. We suggest joining Statistically Speaking, where you have access to a private forum and more resources 24/7.

Primary Sidebar

This Month’s Statistically Speaking Live Training

  • January Member Training: A Gentle Introduction To Random Slopes In Multilevel Models

Upcoming Workshops

  • Logistic Regression for Binary, Ordinal, and Multinomial Outcomes (May 2021)
  • Introduction to Generalized Linear Mixed Models (May 2021)

Read Our Book



Data Analysis with SPSS
(4th Edition)

by Stephen Sweet and
Karen Grace-Martin

Statistical Resources by Topic

  • Fundamental Statistics
  • Effect Size Statistics, Power, and Sample Size Calculations
  • Analysis of Variance and Covariance
  • Linear Regression
  • Complex Surveys & Sampling
  • Count Regression Models
  • Logistic Regression
  • Missing Data
  • Mixed and Multilevel Models
  • Principal Component Analysis and Factor Analysis
  • Structural Equation Modeling
  • Survival Analysis and Event History Analysis
  • Data Analysis Practice and Skills
  • R
  • SPSS
  • Stata

Copyright © 2008–2021 The Analysis Factor, LLC. All rights reserved.
877-272-8096   Contact Us

The Analysis Factor uses cookies to ensure that we give you the best experience of our website. If you continue we assume that you consent to receive cookies on all websites from The Analysis Factor.
Continue Privacy Policy
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.

Non-necessary

Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.