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 |
Steve Samuels <sjsamuels@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: prtest and survey weights |

Date |
Sat, 13 Mar 2010 09:49:12 -0500 |

I should have clarified that the first example tests the hypothesis that the row and column marginal proportions are equal. (These are the "correlated proportions" I referred to). This is the same hypothesis addressed by McNemar's test in non-survey data. On Sat, Mar 13, 2010 at 9:35 AM, Steve Samuels <sjsamuels@gmail.com> wrote: > It's not clear which two proportions Omar wants to compare . If he > means correlated proportions (two attributes measured on the same > person), here's a way that uses -svy: tab- > > **************************CODE BEGINS************************** > sysuse auto, clear > svyset _n > set seed 2000 > gen u=uniform() > sort u > gen cat = _n<39 // new 2-level category > svy: tab foreign cat > test _b[p12] = _b[p21] > lincom _b[p12] - _b[p21] > ***************************CODE ENDS*************************** > > If he means: test the equality of two cell proportions of the same > attribute, he can use -svy: prop- as Mary stated. > > ***************************CODE BEGINS************************** > sysuse auto, clear > svyset _n > svy: prop rep78 > test _b[1] = _b[5] > lincom _b[1] - _b[5] > > svy: prop foreign > test _b[Foreign] = _b[Domestic] //Use the category values shown in > the results > test _b[1] = _b[0] // Unlabeled values don't work > ***************************CODE ENDS*************************** > > Steve > > > > On Fri, Mar 12, 2010 at 2:20 PM, Mary E. Mackesy-Amiti <mmamiti@uic.edu> wrote: >> I believe you can use svy: proportion followed by test (post-estimation >> command). >> >> see: help proportion postestimation >> >> >> Omar McDoom wrote: >>> >>> Dear all, >>> >>> Does anyone know how I may compare two proportions drawn from a variable >>> in >>> a weighted survey? The svy command I understand is not available for >>> prtest. Is there a work-around that allows one to incorporate survey >>> design >>> effects/weights? >>> >>> >>> >>> >> >> -- >> Mary Ellen Mackesy-Amiti, Ph.D. >> Research Assistant Professor >> Community Outreach Intervention Projects (COIP) >> School of Public Health m/c 923 >> Division of Epidemiology and Biostatistics >> University of Illinois at Chicago >> ph. 312-355-4892 >> fax: 312-996-1450 >> >> * >> * 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/ >> > > > > -- > Steven Samuels > sjsamuels@gmail.com > 18 Cantine's Island > Saugerties NY 12477 > USA > 845-246-0774 > -- Steven Samuels sjsamuels@gmail.com 18 Cantine's Island Saugerties NY 12477 USA 845-246-0774 * * 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: prtest and survey weights***From:*Omar McDoom <callomar@gmail.com>

**Re: st: prtest and survey weights***From:*"Mary E. Mackesy-Amiti" <mmamiti@uic.edu>

**Re: st: prtest and survey weights***From:*Steve Samuels <sjsamuels@gmail.com>

- Prev by Date:
**Re: st: prtest and survey weights** - Next by Date:
**Re: Re: st: RE: Can I compare the coefficients of one certain variablefrom two different samples by -suest-?** - Previous by thread:
**Re: st: prtest and survey weights** - Next by thread:
**Re: st: prtest and survey weights** - Index(es):