jkcshea / ivmte

An R package for implementing the method in Mogstad, Santos, and Torgovitsky (2018, Econometrica).
GNU General Public License v3.0
18 stars 2 forks source link

Informative error message for bad MTR specification #173

Closed a-torgovitsky closed 4 years ago

a-torgovitsky commented 4 years ago
library("ivmte")
results <- ivmte(data = AE,
                 target = "att",
                 m0 = ~ 0,
                 m1 = ~ u + yob,
                 ivlike = worked ~ morekids + samesex + morekids*samesex,
                 propensity = morekids ~ samesex)

gives the uninformative error

Error in if (exporder[x] == 0) { : argument is of length zero