Date: Mon, 28 Apr 1997 16:09:00 -0400
Reply-To: Dave_Mabey@READERSDIGEST.COM
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Dave_Mabey@READERSDIGEST.COM
Subject: Re: Help: Mutiple Comparison
Content-type: text/plain; charset=US-ASCII
Dave Mabey @ READERSDIGEST
04/28/97 04:09 PM
New Text Item: Help: Mutiple Comparison
-lei,
I would use either the DATASTEP or PROC SQL. Some examples follow; take
your pick. If you have missing values, you will need to modify the
DATASTEP ... on second thought, just stick to the SQL solution because
it is simpler and more robust.
HTH -dave
/*** SOME TEST DATA ***/
DATA A B C D;
DO I=1 TO 100;
X=UNIFORM(0)*4; OUTPUT A;
X=UNIFORM(0)*3; OUTPUT B;
X=UNIFORM(0)*2; OUTPUT C;
X=UNIFORM(0) ; OUTPUT D;
END;
RUN;
/*** A DATA STEP SOLUTION ***/
DATA RESULTS;
DO UNTIL (DONE);
SET A END=DONE NOBS=ACNT;
ATOTAL+X;
END;
DONE=0;
DO UNTIL (DONE);
SET B END=DONE NOBS=BCNT;
BTOTAL+X;
END;
DONE=0;
DO UNTIL (DONE);
SET C END=DONE NOBS=CCNT;
CTOTAL+X;
END;
DONE=0;
DO UNTIL (DONE);
SET D END=DONE NOBS=DCNT;
DTOTAL+X;
END;
AMEANS=ATOTAL/ACNT;
BMEANS=BTOTAL/BCNT;
CMEANS=CTOTAL/CCNT;
DMEANS=DTOTAL/ACNT;
TEST=AMEANS > BMEANS > CMEANS > DMEANS;
KEEP AMEANS BMEANS CMEANS DMEANS TEST;
RUN;
PROC PRINT;
RUN;
/*** A SQL SOLUTION ***/
PROC SQL;
SELECT *,
AMEANS > BMEANS > CMEANS > DMEANS AS TEST
FROM (SELECT MEAN(X) AS AMEANS FROM A),
(SELECT MEAN(X) AS BMEANS FROM B),
(SELECT MEAN(X) AS CMEANS FROM C),
(SELECT MEAN(X) AS DMEANS FROM D);
______________________________ Reply Separator ____________________________
_____
Subject: Help: Mutiple Comparison
Author: zhang1@GIS.NET@INTERNET at UUCPLINK
Date: 4/24/97 7:42 AM
(Embedded image moved to file: PIC001.PCX)
Hello, All:
Does anyone know how to use multiple comparison methods to solve
the
problem
as follows?
If we have four datasets A, B, C, D, each has a continuous
variable, say X.
Is there any method to test Mean(X in A) > Mean (X in B) > Mean ( X in
C ) > Mean (X in D)? Is there any SAS procs to do those tests. Any
suggestion will be much appreciated.
Lei
SMTPOriginator: owner-sas-l@VM.MARIST.EDU