Date: Tue, 8 Jan 2002 11:32:46 -0700
Reply-To: Richard Read Allen <rrallen@ATTGLOBAL.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Richard Read Allen <rrallen@ATTGLOBAL.NET>
Subject: Re: Dunnnett's Test
Content-Type: text/plain; charset="us-ascii"; format=flowed
Brian/David,
If you're stuck with version 6.12, you can get the same results using proc
mixed and the make 'Diffs' statement along with the LSmeans. Much easier
than proc printto!
Richard
At 11:47 AM 1/8/02 -0500, you wrote:
>This may be a dumb question, but wouldn't this only work in version 8?
>
>David, what version of SAS are you using? I am using version 6.12, and I
>have developed a means by which
>you have SAS write an output file and then read it back in to get the p_value.
>
>Would this help?
>
>Brian
>
>john.hixon@KODAK.COM wrote:
>
> > From: John Hixon
> >
> > /*
> > David Jensen asked:
> >
> > >Could someone please help me with a problem I just can't seem to solve. I
> > >can get Dunnett's test results output listing using Proc GLM but I cannot
> > >get the p-value for the test so that I can output it to a dataset. I
> cannot
> > >find anything in any SAS documentation that shows me how to output this
> > >p-value to an output dataset. Does someone know how to do this?
> >
> > >Thanks so much in advance.
> >
> > I don't have a lot of time, but, here's an example that illustrates this.
> > I am using the "LSMeans" statement in GLM. I think you can also do
> Dunnett's test
> > on the un-adjusted means.
> >
> > The key to getting ANYTHING out of a SAS/STAT Proc is to go to the online
> > help and look at the "Additional Topics/ODS Table Names" for that
> Proc. This will
> > tell you which ODS Output Table has the particular output of interest.
> >
> > In your case, all we need to do is tell the ODS to create the table
> "LSMeans".
> > See below for details.
> >
> > HTH.
> >
> > John Hixon
> > Eastman Kodak Company
> > Rochester, NY USA
> >
> > */
> >
> > * create dummy data;
> > data junk;
> > do Block='Block1', 'Block2', 'Block3';
> > if Block='Block1' then BlockEffect=-1.25;
> > if Block='Block2' then BlockEffect=0.0;
> > if Block='Block3' then BlockEffect=1.3;
> > do A1='Daylight', 'Tungsten';
> > do x1=-10 to 10 by 10;
> > do x2=-10 to 10 by 10;
> > do x3=-10 to 10 by 10;
> > if A1='Daylight' then do;
> >
> y1=100+BlockEffect+3.2*x1+2.9*x2+5.6*x3+x1*x2+x1*x3+x1*x1+x2*x2+1.5*rannor(1234);
> > y2=sqrt(y1);
> > output;
> > end;
> > else do;
> >
> y1=100+BlockEffect-3.2*x1+2.9*x2-5.6*x3+x1*x2+x1*x3+x1*x1+x2*x2+1.5*rannor(1234);
> > y2=sqrt(y1);
> > output;
> > end;
> > end; end; end; * end x1,x2,x3;
> > end; * end Day,Tung;
> > end; * end Block;
> > run;
> >
> > * ask to create output table named LSMeans from the ODS table LSMeans;
> > ods output LSMeans=LSMeans;
> > proc glm data=junk;
> > class Block A1;
> > model y1 = a1 Block a1*x1 a1*x2 a1*x3 x1|x2|x3 x1*x1 x2*x2 x3*x3
> / SS3;
> > lsmeans Block / pdiff=control('Block1') ;
> > run;quit;
> > proc print data=LSMeans;
> > run;
|