Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Pweight and oneway ANOVA


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Pweight and oneway ANOVA
Date   Fri, 5 Sep 2008 11:43:30 +0100 (BST)

--- Tam Lin <kirtlegreen@yahoo.co.uk> wrote:
> I am using survey data with probability weights.  I want to see if
> there is a significant difference in age (continuous variable) across
> nine different ethnic groups (categorical variable).  A one-way ANOVA
> would seem to be the appropriate test here.  
> 
> However, STATA 9 is too clever for me and gives me an error message
> when I try to run a one-way ANOVA with pweight.
> 
> Here is the syntax if it helps to clarify:
> 
> oneway rage ethnicity4 if subpop6==1 [pweight=wtfinds], tabulate
> scheffe
> 
> (my subpopulation is restricting this test to only those aged 55 or
> over)
> 
> My question is, why is there an error and is there a way to run this
> test with pweights?

It looks like you have a complex survey design, see -help svy-, in
which case you should use the subpop option within the 
-svy- prefix. Anyhow -oneway- is not svy capable. This is not a bad
thing as ANOVA is nothing else than a weird way of doing 
-regress-. If I interpret your situation correctly then the following
should give you the correct test:

svyset [pweight=wtfinds]
xi: svy, subpop(subpop6): regress rage i.ethnicity4 
testparm _I*

Hope this helps,
Maarten


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      
*
*   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/



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