lalonde {CovSel} | R Documentation |
Real data, Lalonde
Description
In order for the code used to create this data frame to work text files available on Dehejia's webpage http://www.nber.org/~rdehejia/data/nswdata2.html need to be downloaded and stored in the working directory. The data frame consists of 297 treated units from a randomized evaluation of a labor training program, the National Supported Work (NSW) Demonstration, and 314 nonexperimental comparison units drawn from survey datasets.
treated <- read.table(file = "nswre74_treated.txt")
controls <- read.table(file = "cps3_controls.txt")
nsw <- rbind(treated, controls)
ue <- function(x) factor(ifelse(x > 0, 0, 1))
UE74 <- mapply(ue, nsw[, 8])
UE75 <- mapply(ue, nsw[, 9])
nsw[, 4:7] <- lapply(nsw[, 4:7], factor)
lalonde <- cbind(nsw[, 1:9], UE74, UE75, nsw[, 10])
colnames(lalonde) <- c("treat", "age", "educ", "black", "hisp", "married",
"nodegr", "re74", "re75", "u74", "u75", "re78")
Usage
data(lalonde)
Format
A data frame with 614 observations on the following 12 variables.
treat
a numeric vector
age
a numeric vector
educ
a numeric vector
black
a factor with two levels
hisp
a factor with two levels
married
a factor with two levels
nodegr
a factor with two levels
re74
a numeric vector
re75
a numeric vector
u74
a factor with two levels
u75
a factor with two levels
re78
a numeric vector