Hello!
I'm estimating two probit models, the first doesn´t have an interaction term but the second does. I then take the marginal effect of the main variable of interest (this variable is interacted in the second model). My main goal is to check if the coefficients from both regressions are equal to each other, i.e., if they are the same, I´m considering that including the interaction term is not relevant.
After reading similar threads on Statalist and reading help files, I have attempted:
Would this manual implementation of the test be correct?
Thank you for your help.
Best,
Hélder
I'm estimating two probit models, the first doesn´t have an interaction term but the second does. I then take the marginal effect of the main variable of interest (this variable is interacted in the second model). My main goal is to check if the coefficients from both regressions are equal to each other, i.e., if they are the same, I´m considering that including the interaction term is not relevant.
After reading similar threads on Statalist and reading help files, I have attempted:
- hasuman test: I have some concerns that the implementation of this command is not valid in my case. Also, the test applies to all variables, but only want it applied to the main coefficient of interest.
- using the suest command: this yields a common error already discussed on Stalist "was estimated with a nonstandard vce (delta)"
- saving the parameters as scalars and computing the pvalue manually: as far as I know, this works, but I would like the opinion of someone that has a better understanding of the problem.
Code:
est clear
webuse margex, clear
probit outcome c.age c.distance
margins, dydx(age distance) post
est store m1
scalar me1 = _b[age]
scalar se_me1 = _se[age]
probit outcome c.age##c.distance
margins, dydx(age distance) post
est store m2
scalar me2 = _b[age]
scalar se_me2 = _se[age]
hausman m1 m2, alleqs constant
// "model fitted on these data fails to meet the asymptotic assumptions of the Hausman test; see suest for a generalized test."
// on my data and regressions I don´t have this problem.
test (me1 = me2)
scalar se_diff_me = sqrt(se_me1^2 + se_me2^2)
scalar test_stat = diff_me/se_diff_me
scalar p_value = 2 * normal(-abs(test_stat))
di "Test statistic: " test_stat
di "P-value: " p_value
Thank you for your help.
Best,
Hélder

Comment