Date: Mon, 6 Jun 2005 16:36:11 -0700
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "David L. Cassell" <cassell.david@EPAMAIL.EPA.GOV>
Subject: Re: compare 2 means: which PROC to use?
Content-type: text/plain; charset=US-ASCII
i_ponder <email@example.com> wrote:
> We have data from a multi-stage survey, complete with weights. we want
> to compare means across two groups of the data e.g male vs female. We
> notice that TTest has the weight option. Is it okay to use this proc,
> or is there another preferable Proc?
PROC TTEST and PROC UNIVARIATE and PROC MEANS can all do a t-test.
But none of them can handle survey design effects properly.
You really need to do this using PROC SURVEYREG. If you're
splitting the data into two sub-populations with unknown sizes,
you also need to use domain (or subpopulation) analysis if you
want to look at the individual subpopulations properly (means
and such for the 'groups' can be done in PROC SURVEYMEANS).
Don't split the data into 'categories of interest' for analysis
using a BY statement - that typically will muck up your estimation.
Do you have weights aggregated up across all your stages?
If not, you need to get that fixed.
You'll need to specify the stage-one sampling protocols as part
of the statements for the procs. Since I don't know those, I
can't write the SAS code for you.
David Cassell, CSC
Senior computing specialist