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 |
"Qian, Yiming" <yiming-qian@uiowa.edu> |

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

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/

**Follow-Ups**:**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>

- Prev by Date:
**Re: st: Text editor that has automatic table of contents?** - Next by Date:
**Re: st: expected values after xtpcse** - Previous by thread:
**st: expected values after xtpcse** - Next by thread:
**st: RE: using estimate store + suest+test to compare regression coefficients between two samples, how to adjust for clustering** - Index(es):