PH784: Problem Set #3

Author

Koichiro Shiba

Published

November 11, 2025

Panel data analysis

In this problem set, we will use the data WageData from the R package panelr.

These data come from the years 1976-1982 in the Panel Study of Income Dynamics (PSID), with information about the demographics and earnings of 595 individuals.

This dataset includes the following variables:

  • id: Unique identifier for each survey respondent
  • t: A number corresponding to each wave of the survey, 1 through 7
  • lwage: Natural logarithm of earnings in the past year
  • union: Binary indicator of whether respondent is a member of a union (1 = union member)
  • wks: Weeks worked in the past year
  • ms: Binary indicator of whether respondent is married (1 = married)
  • fem: Binary indicator of whether respondent is female (= 1)
  • blk: Binary indicator of whether respondent is African-American (= 1)
  • ed: Years of education

Note that this dataset is in a “long” format (i.e., each row represents a person-wave observation), and each individual id has multiple rows for different t.

Let’s say we want to estimate the effect of union membership (union) on earnings (lwage). After carefully selecting covariates, we fit the following regression model (see the line for lm()).

term estimate conf.low conf.high p.value
(Intercept) 5.1 5 5.2 0
union 0.087 0.064 0.11 0.000000000000096
wks 0.0044 0.0024 0.0065 0.000026
ms 0.13 0.093 0.17 0.00000000003
fem -0.31 -0.36 -0.27 0.00000000000000000000000000000000000025
blk -0.13 -0.17 -0.092 0.00000000032
ed 0.068 0.064 0.072 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000099
t 0.097 0.092 0.1 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021

Q1. What is the exchangeability assumption we need to causally interpret the estimate for union (0.087)?

Your answer

Q2. When the exchangeability assumption you stated in response to Q1 holds, can you interpret the estimate for marital status ms? Why? Why not?

Your answer


Now consider a different approach to model this data. The following code uses the lm() to fit a different model for the relationship union and lwage. Notice that the following table only shows the first estimates of the regression output by using the slice(1:4).

term estimate conf.low conf.high p.value
(Intercept) 6 5.8 6.2 0
union 0.054 0.0048 0.1 0.032
wks 0.00096 -0.001 0.003 0.35
ms -0.084 -0.15 -0.021 0.0094

Q3. Explain how this model differs from the first one in terms of adjusted covariates.

Your answer

Q4. What is the exchangeability assumption we need to causally interpret the estimate for union (0.054)?

Your answer

Longitudinal study

The next few questions are about the following article published in The Lancet Healthy Longevity in 2021.

You do not need to read the paper to complete this problem set. Briefly, this study used wave 2-8 data from the English Longitudinal Study of Aging (ELSA) to examine the association between social isolation/loneliness and frailty among older adults in the UK.

They performed multivariable Cox Regression to estimate hazard ratios for the association between baseline social isolation/loneliness at wave 2 and frailty incidence through wave 8. This model adjusted for the baseline gender, age, marital status, ethnicity, education status, smoking status, and wealth. They reported increased hazards of frailty incidence for greater levels of social isolation (HR=2.62; 95% CI: 2.49-2.76 for “High” compared to “Low”) and loneliness (HR=1.32; 95% CI: 1.22-1.43 for “High” compared to “Low”).


Most of the past research on this topic had been mostly cross-sectional. One major concern was reverse causation, whereby frailty leads to social isolation and loneliness.

Q5. In this longitudinal study, do you think the authors successfully addressed the problem? Justify your answer.

Your answer


A reviewer pointed out that these estimates could be biased due to an unmeasured confounder of alcohol consumption.

Q6. Discuss the potential magnitude of this bias, considering the specific regression model they used. No need to provide quantitative bias assessment.

Your answer


This study assumed the exchangeability for levels of loneliness conditional on social isolation, age, marital status, ethnicity, education status, smoking status, and wealth.

Q7. Propose one negative control outcome to falsify this conditional exchangeability assumption for the loneliness exposure. Explain why you think it is a good negative control outcome. Suppose you have infinite resources to collect any data. Be creative!

Your answer