LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 1998, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 21 Dec 1998 17:30:29 -0000
Reply-To:     David Thompson <dtas@netcomuk.co.uk>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         David Thompson <dtas@NETCOMUK.CO.UK>
Subject:      Re: P-values from Proc GLM
Comments: To: John Iwaniszek <jiwanisz@QCHN.QUINTILES.COM>
Content-Type: text/plain; charset="us-ascii"

You can get p-values from PROC GLM in version 6 using PROC GLM OUTSTAT=dset;

David Thompson Consultant Statistician

David Thompson Applied Statistics Tel +44 (0) 1703 620808 105 Leigh Road Fax +44 (0) 1703 620807 Eastleigh e-mail dtas@netcomuk.co.uk Hampshire SO50 9DR http://www.netcomuk.co.uk/~dtas/index.htm United Kingdom

-----Original Message----- From: John Iwaniszek <jiwanisz@QCHN.QUINTILES.COM> Newsgroups: bit.listserv.sas-l To: SAS-L@VM.MARIST.EDU <SAS-L@VM.MARIST.EDU> Date: 21 December 1998 12:56 Subject: Re: P-values from Proc GLM

>The best way (before version 7) to get p-values, etc. is from proc mixed >using the make statement. > >john > > > > > > >Jules Bosch <jxb@BELLATLANTIC.NET> on 12/19/98 08:52:44 AM > >Please respond to Jules Bosch <jxb@BELLATLANTIC.NET> > >To: SAS-L@VTVM1 >cc: (bcc: John Iwaniszek/QCHN/Quintiles) >Subject: Re: P-values from Proc GLM > > > > >Boyd Newlin wrote: >> >> Hello, >> >> It is it possible to output the p-values from proc GLM into a dataset? >> If so what is the code? >> > >======================= > >I believe PROC GLM will produce a SAS data set but it may not >contain the p-values. But, Output from the procedure does >contain the P-values. One approach to getting the P-values is >the following which I developed a few years back, with PROC GLM >help from a statistician. It was developed in the UNIX >environment using SAS 6.11, I think. > >Simply stated, PROC GLM output is sent to an external file >(LEVENE) and then read into a SAS data set using the INFILE >statement in the data step following the PROC GLM. > > /* THIS OPTIONS STATEMENT IS IMPORTANT */ > options nocenter; > > /* REDIRECT PROC GLM OUTPUT TO AN EXTERNAL FILE */ > filename levene '$HOME/levene'; > proc printto print=levene new; > run; > > /* RUN ANOVA USING LEVENE'S TEST FOR HOMOGENEITY OF VARIANCE */ > title1 'ANOVA Running Levene''s Test'; > proc glm data=work.levene; > by phaseday; > class groupid; > model rbwt=groupid /ss3; > run; > > /* REDIRECT OUTPUT BACK TO DEFAULT */ > proc printto; > run; > > /* READ EXTERNAL GLM OUTPUT FILE "LEVENE" TO GATHER KEY INFO */ > data work.levene2 > (keep=phaseday df1 f_value p_value df2 mark animalno > source groupid); > infile levene missover pad; > length animalno $20 source $8; > animalno='ttt'; > source='levene2'; > groupid=999; > input word1 $12. @; > retain phaseday df1 f_value p_value mark; > if word1=:'PHASEDAY=' then > phaseday=input(scan(word1,2,'='),3.0); > else if (word1='Model') then > do; > input df1 ssq msq f_value p_value; /* <--- P-values */ > if (p_value>0.01) then > mark='NS'; > else > mark=' S'; > end; > else if (word1='Error') then > do; > input df2; > output; > end; > run; > >The above "data work.levene2" step reads the output lines from >the PROC GLM run. > >One of the more important aspects of all this is which option >(CENTER/NOCENTER) is in effect. The above was written with the >NOCENTER option in effect for SAS Output. It was part of an AF >application. After extensive testing and some time in production >the code began to fail (and so did my breathing) when some users >had the CENTER option in effect as they opened the app. The >problem was resolved, of course, with the above "options nocenter" >statement. > >HTH. > >Jules Bosch >


Back to: Top of message | Previous page | Main SAS-L page