Date: Fri, 24 Aug 2007 15:50:56 -0500
Reply-To: Mary <mlhoward@avalon.net>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mary <mlhoward@AVALON.NET>
Subject: Re: Question on running simulation study with SAS (Using ODS)
Content-Type: text/plain; charset="iso-8859-1"
Sanrou,
You should be able to get a data set output from PHREG- set your ODS trace on if you don't know what the output tables are. For example, I might want to save the fit statistics from Proc Logistic:
ods output FitStatistics= fitstatistics_set;
proc logistic....
And then I can take that data set and form another data set from it, subsetting not only rows but columns/variables as well:
data fitstatistics_set;
informat aic 7.5;
set fitstatistics_set;
if Criterion='AIC';
aic=interceptandcovariates;
keep aic;
run;
Then you can export that resulting data set to Excel.
-Mary
----- Original Message -----
From: sanrou
To: SAS-L@LISTSERV.UGA.EDU
Sent: Friday, August 24, 2007 3:25 PM
Subject: Question on running simulation study with SAS (Using ODS)
I am running a simulation type study with SAS. PHREG procedure is
performed on some hundreds of dataset. I managed to use SAS ODS to
produce an Excel file that contains the only table I need for follow
up computations, an sample output would look like:
PWP-GAP TIME
SUMMARY 1
23:14 Thursday, August
23, 2007
The PHREG Procedure
Analysis of Maximum Likelihood Estimates
Parameter Standard
Hazard
Variable DF Estimate Error Chi-Square Pr >
ChiSq Ratio
CLASS1 1 2.29375 0.40505 32.0685 <.
0001 9.912
CLASS2 1 2.22387 0.42252 27.7035 <.
0001 9.243
CLASS3 1 1.95692 0.43109 20.6070 <.
0001 7.078
CLASS4 1 3.20469 0.65672 23.8125 <.0001
24.648
CLASS5 1 2.23503 0.50084 19.9146 <.
0001 9.347
CLASS6 1 2.80052 0.79680 12.3531 0.0004
16.453
CLASS7 1 2.47812 0.79632 9.6844 0.0019
11.919
CLASS8 1 1.88125 0.70294 7.1624
0.0074 6.562
CLASS9 1 1.74099 0.82379 4.4664
0.0346 5.703
CLASS10 1 0.84553 1.16342 0.5282
0.4674 2.329
Is it possible to let ODS strip off everything but only store the
column name "Parameter Estimate" in the Excel file? That would
simplify my follow up computations works in Excel.
Thanks,
Jindan