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

Erroneous warning message for ignoring shape constraints #213

Closed a-torgovitsky closed 2 years ago

a-torgovitsky commented 2 years ago
ivmte(
  data = AE,
  ivlike = c(worked ~ morekids + samesex + morekids * samesex),
  target = "ate",
  m0 = ~ u,
  m1 = ~ u,
  propensity = morekids ~ samesex,
  solver = "gurobi"
)

Point estimate of the target parameter: -0.07791036

Warning message:
MTR is point identified via GMM. Shape constraints are ignored.

There aren't any shape constraints here, so nothing to ignore.

jkcshea commented 2 years ago

Ah, but what about the bounds on m0 and m1? Are they not considered shape constraints? If unspecified, m0.lb, m0.ub, m1.lb, m1.ub are set to the min/max of the outcome variable in the data.

a-torgovitsky commented 2 years ago

Yes you're right, although I still worry that this will confuse people. I would be ok with this warning message if the input had explicitly specified m0.lb for example. But given that the user didn't put that in, and may just want to be estimating point identified models, it seems like it could create confusion. Is it easy to detect whether there was any input received for the shape constraint options? I guess we would only want to print this message if the user passed any shape constraint input.

jkcshea commented 2 years ago

Is it easy to detect whether there was any input received for the shape constraint options?

Yes! I will do that.