Closed hahoangnhan closed 3 months ago
I think using t.test
is not the correct choice. I believe this is operating as if the coefficient estimates were 3 observations and calculating the standard error based on that.
The package marginaleffects
with function hypotheses
is your friend here
I think using
t.test
is not the correct choice. I believe this is operating as if the coefficient estimates were 3 observations and calculating the standard error based on that.The package
marginaleffects
with functionhypotheses
is your friend here
Hi @kylebutts, thanks for your response. Do my manual hypothesis tests work better than the base function t.test
in this case? I extracted all details from two fixest
models (reg_future_breach_q1
and reg_future_breach_q1
) and then followed the formal equation to conduct the test.
It depends if you believe the coefficients are independent of one another. If, for example, they are the same observations but different outcome variables, then the coefficients are likely correlated across models.
I think what you're looking for can be done with vcovSUR
It depends if you believe the coefficients are independent of one another. If, for example, they are the same observations but different outcome variables, then the coefficients are likely correlated across models.
I think what you're looking for can be done with vcovSUR
reg_future_breach_q1
and reg_future_breach_q1
have the same equation but different samples. Therefore, I wanted to compare some coefficients between the two models simply. I have addressed the serial correlation by clustering standard errors.
If you think the samples are independent, then what you have above is correct. Note you are running separate tests (not a single joint test). If you want the latter, you probably are best to use vcovSUR
with marginaleffects::hypotheses
as in the README
If you think the samples are independent, then what you have above is correct. Note you are running separate tests (not a single joint test). If you want the latter, you probably are best to use
vcovSUR
withmarginaleffects::hypotheses
as in the README
Many thanks @kylebutts! I'll try something with vcovSUR
with marginaleffects::hypotheses
, seems they offer several interesting analyses.
Hi,
It's not a package issue, but I want to understand the outcomes well. Please correct me if I missed any fixest function that conveniently conducts this test.
I am comparing three coefficients between two models. Method 1: I manually extracted coefficients, se, and nobs and conducted Welch's t-test. Method 2: I simply used the base t.test function.
The results were different between the two methods. I thought that method 1 is more credible as my manual codes consider the se and nobs from the regression outputs while the t.test function only requires inputting two coefficients.
I hope to hear your guidance and suggestions.
Many thanks, HHN