Open lukesonnet opened 5 years ago
car has a seperate method for mlm, you might be able to get this working by fiddling with the classes of the output object that lm_robust is producing.
On Mon, Mar 4, 2019 at 9:05 PM Luke Sonnet notifications@github.com wrote:
lho <- lh_robust(cbind(mpg, am) ~ cyl + gear, data = mtcars, linear_hypothesis = c("cyl = 2", "cyl = gear")) Output:
Error in constants(lhs, cnames_symb) : The hypothesis "cyl = 2" is not well formed: contains bad coefficient/variable names. In addition: Warning message: In constants(lhs, cnames_symb) : NAs introduced by coercion
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DeclareDesign/estimatr/issues/297, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZjTgYlKgv3oU5QATOAInZKOcIjNB7iks5vTfsmgaJpZM4bdyFZ .
method for mlm performs tests but doesn't compute variance or expected value of the linear combination of coefficients, so not so sure what would we include in the tidy output.
:(
We may be able to decompose an mlm
into a list of lm
, but that seems a bit painful.
Any advice here? I don't think we can very easily accommodate this and believe we should explicitly fail to support this with a message, while just returning the usual lm_robust()
output.
I think this should be an error that says you have to go outcome by outcome
Anyone have any feelings re: error? I think that's also reasonable. I'll implement it as such later today/tomorrow if no other feedback.
lho <- lh_robust(cbind(mpg, am) ~ cyl + gear, data = mtcars, linear_hypothesis = c("cyl = 2", "cyl = gear"))
Output: