estimatr
estimatr copied to clipboard
lh_robust bug
From a user:
Since version 0.18.0 (or earlier), I found that the joint hypothesis test is not performed with lh_robust, but it only performs single hypotheses.
In the manual (pp. 24, "Example"), it writes*
# The linear hypothesis argument can be specified equivalently as:
lh_robust(y ~ x + z, data = dat, linear_hypothesis = "z = 2x")
lh_robust(y ~ x + z, data = dat, linear_hypothesis = c("z = 1", "x = 2"))
but actually they perform different hypothesis tests. The former is the test of z = 2x, but the latter only performs the t-test of z = 1 and x = 2, respectively, but not the joint test of z = 1 AND x = 2.
In the car::linearHypothesis function, the same specification performs the joint test and returns the result of F-test.
I think that lh_robust used to returns the same result as linearHypothesis. (probably version 0.16.0)
This is not a bug. What should happen here is glance(lh_robust(.)) should report the F test. Switching to a feature request.
So the idea is to have glance report joint specification f tests when we are glancing a lh_robust
object?
Exactly
But these are different tests? I'm not sure how these are testing the same thing. I think our help is wrong. We can still add this feature to glance, but the example isn't true, right?
Exactly, we should just add to glance but not based on the example
Argh we should have removed this example before 0.20.0. They aren't the same.