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

From |
Steven Samuels <sjhsamuels@earthlink.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Comparing frequencies with pweight |

Date |
Mon, 17 Nov 2008 14:56:58 -0500 |

-Steve On Nov 15, 2008, at 10:38 PM, Erick Guerrero wrote:

Thanks for the reply Steve, yes, x is an attribute of orgs - forinstance - dummy of whether they are for profit or not.So, tab forprofit wavenumber (pweight= number of clients) my total sample for both waves is 1118 orgsI basically want to run a chi-square or a t-test between an orgattribute and wavenumber but weight by number of clients.I tried the svyset - (pweight=number of clients), and then use svy:tab forprofit wavenumber - but I get an ackward result.or the *Normal Chi-square has a huge N* . tab pfp wavenum, row col chi +-------------------+ | Key | |-------------------| | frequency | | row percentage | | column percentage | +-------------------+ | wavenum pfp dummy | 4 6 | Total -----------+----------------------+---------- 0 | 527 430 | 957 | 55.07 44.93 | 100.00 | 86.11 77.48 | 82.01 -----------+----------------------+---------- 1 | 85 125 | 210 | 40.48 59.52 | 100.00 | 13.89 22.52 | 17.99 -----------+----------------------+---------- Total | 612 555 | 1,167 | 52.44 47.56 | 100.00 | 100.00 100.00 | 100.00 Pearson chi2(1) = 14.7018 Pr = 0.000 . tab pfp wavenum [pweight= nuosatcl], row col chi pweight not allowed *Using survey option - reports low column percentages. * . svyset pweight: nuosatcl VCE: linearized Single unit: missing Strata 1: <one> SU 1: <observations> FPC 1: <zero> . svy:tab pfp wavenum (running tabulate on estimation sample)Number of strata = 1 Number of obs= 1121Number of PSUs = 1121 Population size= 696235Design df = 1120-------------------------------| wavenum pfp dummy | 46 Total----------+-------------------- 0 | .4576 .3995 .857 1 | .048 .095 .143 | Total | .5056 .4944 1 ------------------------------- Key: cell proportions Pearson: Uncorrected chi2(1) = 21.5824 Design-based F(1, 1120) = 5.1446 P = 0.0235 *For MEANS* . svy: mean latinclients, over(wavenum) (running mean on estimation sample) Survey: Mean estimation Number of strata = 1 Number of obs = 1088 Number of PSUs = 1088 Population size = 673329Designdf = 10874: wavenum = 4 6: wavenum = 6 -------------------------------------------------------------- | Linearized Over | Mean Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ latinclients | 4 | 11.36198 .9582807 9.481693 13.24227 6 | 17.05415 1.98646 13.15642 20.95188 -------------------------------------------------------------- . test [latinclients]4 - [ latinclients]6=0 Adjusted Wald test ( 1) [latinclients]4 - [latinclients]6 = 0 F( 1, 1087) = 6.66 Prob > F = 0.0100 . . . Erick Steven Samuels wrote:Martin's suggestions of -svy: tab- , with "organization'designated as the psu, is probably the right one. However, I'm notsure. With your specification "x" and "y" must be attributes ofthe organizations. One must be "wave". What is the other? -pweight- will weight the organizations by the number of clients.So, essentially you are classifying clients by the attribute oftheir organization and ignoring organization , except to computestandard errors. For example, if you classify organizations as"big" and "small", -svy: tab- would compare the proportions ofclients who are in big organizations in 1995 and 2005 Is this whatyou want?Are the 618 organizations a sample of a population? If so, pleasedescribe the design, for you need to take into account otheraspects of the design. Final question: what do you mean by "adjustfor N"?-Steve On Nov 14, 2008, at 12:24 PM, Martin Weiss wrote:Have you checked out -help svy: tabulate twoway-? HTH Martin -------- Original-Nachricht --------Datum: Fri, 14 Nov 2008 09:52:33 -0600 Von: Erick Guerrero <erickg@uchicago.edu> An: statalist@hsphsun2.harvard.edu Betreff: st: Comparing frequencies with pweightHi, I need code for Stata to do descriptives - chi-squares with p-weights and adjust for N.I am trying to compare percentages between two waves (1995 and2005) on618 organizations. The tab x y, col row chi with pweight (number of clients in eachorganization) does not work, and when I use fweight gives me aninflatedN. What is the proper way to compare these frequencies inorganizationsand weight by number of clients and adjust for N in stata? Thanks, Erick * * 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/-- Martin Weiss Hackersteigle 3 72076 Tübingen 00497071/793535 00491784597218 Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer * * 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: Comparing frequencies with pweight***From:*Erick Guerrero <erickg@uchicago.edu>

**Re: st: Comparing frequencies with pweight***From:*"Martin Weiss" <Martin.Weiss1@gmx.de>

**Re: st: Comparing frequencies with pweight***From:*Steven Samuels <sjhsamuels@earthlink.net>

**Re: st: Comparing frequencies with pweight***From:*Erick Guerrero <erickg@uchicago.edu>

- Prev by Date:
**st: SV: RE: file write + if condition?** - Next by Date:
**Re: st: Conditional multinomial logistic regression** - Previous by thread:
**Re: st: Comparing frequencies with pweight** - Next by thread:
**st: Conditional multinomial logistic regression again** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |