Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: AW: RE: RE: using estimate store + suest+test to compare regression coefficients between two samples, how to adjust for clustering |

Date |
Tue, 2 Mar 2010 09:08:59 +0100 |

<> Note that -help qreg postestimation- does not purport to allow -suest-. So you have to compute your test differently, see http://www.stata.com/support/faqs/stat/chow3.html http://www.stata.com/support/faqs/stat/chow.html HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Qian, Yiming Gesendet: Dienstag, 2. März 2010 05:21 An: statalist@hsphsun2.harvard.edu Betreff: st: RE: RE: using estimate store + suest+test to compare regression coefficients between two samples, how to adjust for clustering Martin, Thank you very much for your kind help! It answers my question perfectly! I have a follow-up question: can I use similar tests for median regressions (qreg)? If not suest+test, how to compare coefficients across models for median regressions? I tried the following codes: qreg y x1 x2 x3 x4 if female==0 estimates store male qreg y x1 x2 x3 x4 if female==1 estimates store male suest male female I got the following error message: "unable to generate scores for model male suest requires that predict allow the score option r(322);" Thanks a lot! Yiming -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Weiss Sent: Monday, March 01, 2010 2:51 PM To: statalist@hsphsun2.harvard.edu Subject: st: RE: using estimate store + suest+test to compare regression coefficients between two samples, how to adjust for clustering <> "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);"" Just follow Stata`s advice, I would say: ******* sysuse auto, clear reg price weight length if foreign est store for reg price weight length if !foreign est store dom suest for dom, cluster(rep) test ([for_mean]_b[weight ] = [dom_mean]_b[weight ]) ([for_mean]_b[length ] = [dom_mean]_b[length ]) testnl ([for_mean]_b[weight ] / [dom_mean]_b[weight ]) = ([for_mean]_b[length ] /[dom_mean]_b[length ]) ******* HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Qian, Yiming Sent: Montag, 1. März 2010 21:40 To: statalist@hsphsun2.harvard.edu Subject: st: using estimate store + suest+test to compare regression coefficients between two samples, how to adjust for clustering 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/ * * 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/ * * 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/ * * 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/

**References**:**st: using estimate store + suest+test to compare regression coefficients between two samples, how to adjust for clustering***From:*"Qian, Yiming" <yiming-qian@uiowa.edu>

**st: RE: using estimate store + suest+test to compare regression coefficients between two samples, how to adjust for clustering***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**st: RE: RE: using estimate store + suest+test to compare regression coefficients between two samples, how to adjust for clustering***From:*"Qian, Yiming" <yiming-qian@uiowa.edu>

- Prev by Date:
**st: Saving first stage IV results** - Next by Date:
**st: Re: !start** - Previous by thread:
**st: RE: RE: using estimate store + suest+test to compare regression coefficients between two samples, how to adjust for clustering** - Next by thread:
**st: Question on survey data analysis** - Index(es):