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.

Re: st: means compairison with weights and unequal variance

 From Nick Cox To statalist@hsphsun2.harvard.edu Subject Re: st: means compairison with weights and unequal variance Date Sun, 20 Nov 2011 11:02:25 +0000

```You may be better off analysing your outcome variable on a transformed
scale, either directly or using a link function through -glm-. -glm-
can use aweights.

Note also the possibility of -regress outcome treatvar- with aweights.

You seem to be relying on significance test results to tell you about
basic characteristics of your data. Something like -dotplot outcome
treatvar- would be a useful supplement.

Nick

Barbro Widerstedt [edited to use Statalist conventions]

> I have a dataset where I try to compare the means of a variable
> between two groups (treated and untreated).
> The data set used is a sample, drawn from the superpopulation by the
> ado-package -cem- (Iaucus et al Coarsened enhanced matching), and
> subsequent estimations should be weighted.
>
> This means that a standard t-test cannot be used, and I searched a bit
> and found that -oneway- is an alternative with weighted data. However,
> the groups have unequal variance which is a problem for -oneway- (at
> least I think so, I know ANOVA mainly by name ...). I read one entry
> that suggests that -oneway- is robust to  groupwise unequal  variance if
> groupsize does not vary too much, but in my case they do (min
> groupsize=2 max groupsize=1273)
>
> ttest <outcome>, by(treatvar) unequal -> t = -2.43
> oneway <outcome> <treatvar> [aweight=cem_weight] -> F=4.06
>
> Both Bartlett's test for equality of variance,  a standard -sdtest- ,
> and -robvar- suggest that I have unequal variance between groups.
>
> Suggestions of alternatives would be greatly appreciated

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