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

Suppress point identification warning when `point = TRUE` #237

Closed a-torgovitsky closed 2 weeks ago

a-torgovitsky commented 2 months ago

MWE:

> args <- list(data = ivmteSimData,
+              outcome = "y",
+              target = "ate",
+              m0 = ~ u,
+              m1 = ~ u,
+              propensity = d ~ factor(z),
+              point = TRUE)
> r <- do.call(ivmte, args)
Warning message:
MTR is point identified via linear regression.

I think it's reasonable to have a point identified warning, but not if point = TRUE is set. This is probably a bug because if the IV-like estimands are specified directly, then we do not get this warning:

> args <- list(data = ivmteSimData,
+              ivlike =  y ~ d + factor(z),
+              target = "ate",
+              m0 = ~ u,
+              m1 = ~ u,
+              propensity = d ~ factor(z),
+              point = TRUE)
> r <- do.call(ivmte, args)
jkcshea commented 2 months ago

Done!

a-torgovitsky commented 2 weeks ago

I'm still seeing a warning...

r$> library("ivmte")

r$> args <- list(data = ivmteSimData, ivlike = y ~ d + factor(z), target = "ate", m0 = ~ u, m1 = ~ u, propensity = d
     ~ factor(z), point = TRUE)

r$> do.call(ivmte, args)

Point estimate of the target parameter: -0.5389508

Warning message:
None of the compatible solvers are installed, so estimation is only possible under point identification. MTR coefficients will be estimated using GMM, and an estimate of the target parameter will be returned only if the MTR coefficients are point identified.

r$>
jkcshea commented 2 weeks ago

Ah sorry! I missed that warning. That one was specific to the case where no solvers are installed. This has been taken care of.