Dear statalisters,
happy new year! :)
I have to test equality of regression coefficients across different models.
The problem is that the models I implement are regressions with different weights (same covariates) and this is not allowed by the test command.
I am using Stata/SE 11 for Windows.
Here a simple example:
clear
set obs 2000
ge xa = 10 + invnorm(uniform())
ge xb = 20 + 3*invnorm(uniform())
ge y = xa + xb + 2*invnorm(uniform())
ge w = invnorm(uniform())
replace w = 0.1 if (w < 0) | (w > 1)
ge v = 2*invnorm(uniform())
replace v = 0.2 if (v < 0) | (v > 1)
reg y xa xb
estimates store alfa
reg y xa xb [aw = w]
estimates store beta
reg y xa xb [aw = v]
estimates store gamma
estimates table alfa beta gamma, eq(1)
return li
suest beta gamma
test [beta_mean = gamma_mean]
Do you have any suggestions?
Thanks in advance!
Michela Bia
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/