Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: using estimate store + suest+test to compare regression coefficients between two samples, how to adjust for clustering
From
"Qian, Yiming" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: using estimate store + suest+test to compare regression coefficients between two samples, how to adjust for clustering
Date
Mon, 1 Mar 2010 14:39:38 -0600
Dear Statalist,
I use "estimates store + suest + test" to compare regression coefficients between two samples. It works fine until I tried to adjust clustering in the regressions. Below are detailed description of the problem. Is there a way to can get around this problem using "suest" or some alternative commands?
I ran the same regression for two groups (male vs. female):
Y = a1*x1 + a2*x2 + a3*x3 + ....
I want to test:
1. The joint hypothesis that a1 and a2 are the same b/w the two groups.
2. The hypothesis that a1/a2 is the same b/w the two groups.
The following stata codes work fine:
reg y x1 x2 x3 x4 if female==0
estimates store male
reg y x1 x2 x3 x4 if female==1
estimates store male
suest male female
test ([male_mean]_b[x1] = [female_mean]_b[x1]) ([male_mean]_b[x2] = [female_mean]_b[x2])
testnl [male_mean]_b[x1]/[male_mean]_b[x2] = [female_mean]_b[x1]/[female_mean]_b[x2])
However, if I add cluster() to the two regressions, I got error messages.
reg y x1 x2 x3 x4 if female==0, cluster(family)
estimates store male
reg y x1 x2 x3 x4 if female==1, cluster(family)
estimates store male
suest male female
The error message is:
"male was estimated with cluster(family).
re-estimate without the cluster() option, and
specify the cluster() option with suest.
r(322);"
Thank you very much!
Yiming Qian
*
* 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/