Closed johnnybonney closed 2 years ago
This seems odd too, right?
Performing direct MTR regression...
MTR is not point identified.
Since with a constant it should be point identified?
Hm, yes, that is odd. I will investigate this as well.
I have found that specifying a constant MTR function (e.g., m0 = ~1) leads to an opaque error.
Resolved!
Here's what happened:
I was selecting the gamma moments for m0
from a named vector.
Because m0 = ~ 1
, I only select the moment for the intercept.
So R converted my selection into a scalar without a name.
That led to some naming issues later in the code, and thus the opaque error:
Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent
This seems odd too, right? Since with a constant it should be point identified?
This was simply because of the binary instrument, which led to a collinear $B$ matrix. Once the instrument takes on 4 values or more, everything is point identified.
Perfect - thanks for the quick fix!
This was simply because of the binary instrument, which led to a collinear matrix. Once the instrument takes on 4 values or more, everything is point identified.
Ah I see because m1
has a cubic specification. Missed that! Thanks
When trying out the new regression approach (using the version on the branch
enhance/direct-regress-lp
), I have found that specifying a constant MTR function (e.g.,m0 = ~1
) leads to an opaque error. Here is an example: