Date: Fri, 9 Jan 2009 07:05:24 -0600
Reply-To: "./ ADD NAME=Data _null_," <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "./ ADD NAME=Data _null_," <iebupdte@GMAIL.COM>
Subject: Re: PROC GLM output
In-Reply-To: <2c8557a00901090425g50667729k1252def2f6e05caa@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
This is one approach using PROC MIXED. Proc mixed gives the diffs in
the arrangement you prefer, but does not compute the variable
Significance. That is done in a data step.
*ods trace on;
proc mixed data=sashelp.class method=type3;
class age;
model weight = age;
lsmeans age / diff cl;
ods output Diffs=Diffs;
ods select Diffs;
run;
quit;
*ods trace off;
ods select all;
proc contents varnum;
data diffs;
set diffs;
length Significance $3;
Significance = ifC(Probt<Alpha,'***',' ');
run;
proc print;
run;
On 1/9/09, Erwan LE DU <dotker@gmail.com> wrote:
> Hi Listers,
>
> I am using proc GLM to search for significant differences in means.
>
> proc GLM data = TEMPSAS (keep=myclass myvar);
>
> class myclass;
>
> model myvar = myclass / NOUNI;
>
> means myclass /T CLDiff DEPONLY ;
>
> run;
>
> I am pleased with the output produced apart from getting the information for
> sig differences in means twice.
>
> ie : let's say I have 3 groups in my class variable G1,G2,G3.
>
> I will get in the ouput :
>
> G1 - G2 *** (sig. difference)
>
> G1 - G3
>
> G2 - G3
>
> G2 - G1 *** (sig. difference)
>
> G3 - G1
>
> G3 - G2
>
> And what i would like it to be :
>
> G1 - G2 *** (sig. difference)
>
> G1 - G3
>
> G2 - G3
>
> Is there any way to do this in the GLM proc ?
>
> Thanks a lot,
>
> Erwan
>
|