Closed a-torgovitsky closed 4 years ago
Done! This should run properly now.
In the previously problematic example you posted, I now get this:
LP solver: Gurobi ('gurobi')
Obtaining propensity scores...
Generating target moments...
Integrating terms for control group...
Integrating terms for treated group...
Generating IV-like moments...
Moment 1...
Moment 2...
Moment 3...
Moment 4...
Independent moments: 4
Performing audit procedure...
Generating initial constraint grid...
Audit count: 1
Minimum criterion: 0.004206539
Obtaining bounds...
Violations: 0
Audit finished.
Bounds on the target parameter: [-0.1433856, -0.1428222]
The code can now also handle the case where both m0
and m1
are just intercept terms.
> ## Run only with intercept terms, with trivial IV-like estimands
> ivmte(data = AE,
+ target = "att",
+ m0 = ~ 1,
+ m1 = ~ 1,
+ ivlike = worked ~ morekids,
+ propensity = morekids ~ samesex,
+ noisy = TRUE)
LP solver: Gurobi ('gurobi')
Obtaining propensity scores...
Generating target moments...
Integrating terms for control group...
Integrating terms for treated group...
Generating IV-like moments...
Moment 1...
Moment 2...
Independent moments: 2
Performing audit procedure...
Generating initial constraint grid...
Audit count: 1
Minimum criterion: 0
Obtaining bounds...
Violations: 0
Audit finished.
Bounds on the target parameter: [-0.1422836, -0.1422836]
> ## Check that it matches the basic difference in means
> mean(AE[AE$morekids == 1, ]$worked) - mean(AE[AE$morekids == 0, ]$worked)
[1] -0.1422836
> ## Run with only intercept, but non-trivial IV-like estimands so that
> ## minimum criterion is violated---bounds no longer match simple
> ## difference in means.
> ivmte(data = AE,
+ target = "atu",
+ m0 = ~ 1,
+ m1 = ~ 1,
+ ivlike = worked ~ morekids + samesex + morekids*samesex,
+ propensity = morekids ~ samesex,
+ noisy = FALSE)
LP solver: Gurobi ('gurobi')
Obtaining propensity scores...
Generating target moments...
Integrating terms for control group...
Integrating terms for treated group...
Generating IV-like moments...
Moment 1...
Moment 2...
Moment 3...
Moment 4...
Independent moments: 4
Performing audit procedure...
Generating initial constraint grid...
Audit count: 1
Minimum criterion: 0.004206539
Obtaining bounds...
Violations: 0
Audit finished.
Bounds on the target parameter: [-0.1431494, -0.1431494]
Looks good, thanks!
gives me
There's nothing about the methodology that should prevent this specification though. If I add a
u
tom0
(but curiously, still leavem1
as constant), then there's no problemyields