|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Test the equality of regression coefficients
Dear Statalist,
I'm trying to test the test the equality of regression coefficients for
two models. Looking at:
http://www.stata.com/support/faqs/stat/testing.html
I can see that the solution should be simple, but I'm stuck.
I'm modeling binary choice data across a series of trials per person to
see how features of the choice environment effects choice for three
groups. I started with the simplest model:-
tsset id trial
xi: xtlogit choice i.group*var1 var2, i(id) nolog re
Each group completed the task under two conditions and I want to compare
coefficients on the i.group*var1 interaction. So according to the above
stata.com page I should append the data and then run something like
tsset id trial
xi3: xtlogit choice i.condition*i.group*var1 var2, i(id) nolog re
and then something like
test _IgroupXcondition_2 - _IgroupXcondition_3 = 0
local sign_ag = sign(_b[_IgroupXcondition_2] - _b[_IgroupXcondition_3])
display "H_0: group1 coef >= group2 coef. p-value = "
normal(`sign_ag'*sqrt(r(chi2)))
But of course, I get
tsset id trial
repeated time values within panel
It seems like there should be a very simple way around this - but I'm
stuck. So any hints would be greatly appreciated.
Regards
Simon
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/