-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
data(lalonde)
lalonde.match.on <- c('age', 'black')
lalonde.match.form <- as.formula(re78 ~ treat + age + black)
# The following works
lalonde.frontier <- makeFrontier(dataset = lalonde,
treatment = 'treat',
match.on = lalonde.match.on)
lalonde.estimates <- estimateEffects(lalonde.frontier, 're78 ~ treat',
mod.dependence.formula = lalonde.match.form,
continuous.vars = c('age', 'education', 're74', 're75'),
prop.estimated = .1,
means.as.cutpoints = TRUE)
# However, it does not after running this line:
lalonde$treat <- lalonde$treat == 1
> lalonde.frontier <- makeFrontier(dataset = lalonde,
+ treatment = 'treat',
+ match.on = lalonde.match.on)
Calculating Mahalanobis distances...
Calculating theoretical frontier...
Calculating information for plotting the frontier...
> lalonde.estimates <- estimateEffects(lalonde.frontier, 're78 ~ treat',
+ mod.dependence.formula = lalonde.match.form,
+ continuous.vars = c('age', 'education', 're74', 're75'),
+ prop.estimated = .1,
+ means.as.cutpoints = TRUE)
Error in confint(results, level = alpha)[frontier.object$treatment, ] :
subscript out of bounds
Metadata
Metadata
Assignees
Labels
No labels