avehtari / ROS-Examples

Regression and other stories R examples
https://avehtari.github.io/ROS-Examples/
325 stars 256 forks source link

Exercise 20.2--missing experimental controls? #115

Open adamSales opened 2 years ago

adamSales commented 2 years ago

Exercise 20.2 (pp. 417-418) uses the LaLonde dataset. Part (a) asks:

Estimate the treatment effect from the experimental data...

However, I am pretty sure that the dataset does not include experimental controls. e.g.

> lalonde <- foreign::read.dta('examples/NSW_dw_obs.dta')
> 
> xtabs(~sample+treat,data=lalonde)
      treat
sample     0     1
     1     0   185
     2 15992     0
     3  2490     0

Am I misunderstanding the problem or the dataset? Or is there something missing?

Edit: in addition, part (b) states

Now use a regression analysis to estimate the causal effect from Dehejia and Wahba’s subset of the constructed observational study.

However, their subsetting sounds like it was based around excluding subjects with missing covariates ("The subsample they chose removes men for whom only one pre-treatment measure of earnings is observed"). However, there doesn't seem to be covariate missingness in the data you provided:

> sapply(lalonde,function(x) mean(is.na(x)))
      age      educ     black   married  nodegree      re74      re75      re78 
        0         0         0         0         0         0         0         0 
     hisp    sample     treat educ_cat4 
        0         0         0         0 

PS It is so cool that y'all posted a free pdf of the book. Thank you!

andrewgelman commented 1 year ago

I'm not an expert on the Lalonde example; that's Jennifer's domain. But I thought the whole point of Lalonde was that they had an observational study and then also an experiment.