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

From |
sjsamuels@gmail.com |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: comparing multiple means with survey data |

Date |
Tue, 23 Jun 2009 12:52:47 -0400 |

Your syntax is correct. You don't need the "linearized" option, as it is the default for -svy: mean-. However, hypothesis testing is usually not appropriate for finite population studies. See: http://www.stata.com/statalist/archive/2009-02/msg00806.html If hypothesis testing is appropriate for your situation , then you should exclude the finite population correction (fpc) option from your -svyset- command. I'm guessing that you also (or only) want to know how different the means in the categories of var2 are. Confidence intervals will provide the answer, and you can keep the finite population correction in your -svyset- statement if appropriate. It is poor practice (and cumbersome) to label categories with strings like "var2a" "var2b". These are unnecessary as "a", "b", .. have no descriptive value. Just make var2 a numeric variable with values 1 2 3 4 5. Use -label define- and -label values- to associate the numeric values with descriptive text. Assuming that you do that, the easiest way to to get confidence intervals for all pairwise differences after -svy: mean- is to write out the 10 statements lincom _b[1] - _b[2] lincom _b[1] - _b[3] ... lincom _b[4] - _b[5] For plotting continuous outcomew with groups I recommend -dotplot- although it will not take weights. -Steve On Mon, Jun 22, 2009 at 4:31 PM, Jean-Gael Collomb <jg@ufl.edu> wrote: > > Hello - > I have been struggling to find a way to compare the means of a different categories of one of my variable. I think I have found a way but I wonder if there would be a more efficient way to do it. In the following example, var 2 has five categories (var2a-var2e). Here's teh commands I type (after survey setting the data): > > svy linearized : mean var1, over(var2) > test [var1]var2a = [var1]var2b = [var1]var2c = [var1]var2d = [var1]var2e, mtest(b) > test [var1]var2b = [var1]var2c = [var1]var2d = [var1]var2e, mtest(b) > test [var1]var2c = [var1]var2d = [var1]var2e, mtest(b) > test [var1]var2d = [var1]var2e, mtest(b) > > Is there a better way to do this? > > Thanks! > > > Jean-Gael "JG" Collomb > PhD candidate > School of Natural Resources and Environment / School of Forest Resources and Conservation > University of Florida > > > > > * > * 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 multiple means with survey data***From:*Jean-Gael Collomb <jg@ufl.edu>

- Prev by Date:
**st: AW: rounding a tempvar** - Next by Date:
**Re: st: File cannot be save error message. Problem with xml_tab and log using.** - Previous by thread:
**st: comparing multiple means with survey data** - Next by thread:
**st: R: counterfactual model based on propensity score** - Index(es):

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