May 31, 2006
Saving PROC REG output in SAS dataset
PROC REG does not provide an option of saving F statistics and p-values in an output data set. Although in real life, we often encounter scenarios where we need to do so. For example, we might want to perform some action only if a particular independent variable is turning out to be significant. Manual processing becomes impossible when you have hundreds of regression models being run.
The output delivery system(ODS) in SAS provides great flexibility in handling output. Here’s the code to save the p values produced by PROC REG into a SAS dataset.
ods listing close; ods output "Parameter Estimates"=<output dataset name>; proc reg data=<input dataset name>; model <dependent var> = <independent variables>; run; quit; ods output close; ods listing;
Just make sure you dont specify the NOPRINT option in PROC REG as the ODS needs an output object.
Anonymous said,
June 1, 2006 at 11:11 pm
Google
Google news and reviews
Corrina Eudora said,
September 20, 2007 at 12:11 am
damn all these beautiful gir. Corrina Eudora.
Liesbeth Kiki said,
October 22, 2007 at 1:53 am
they’ll have you suicidal suicida. Liesbeth Kiki.
Idetrorce said,
December 15, 2007 at 8:07 pm
very interesting, but I don’t agree with you
Idetrorce
apurv said,
July 30, 2008 at 4:47 am
Thank you for posting this. It saved me time and having to write a macro!
Gab said,
May 11, 2009 at 3:20 pm
Thanks, very usefull
sotoDyptomi said,
December 12, 2009 at 6:03 am
I am often searching for new infos in the world wide web about this topic. Thankz.
Liping said,
August 18, 2010 at 3:29 pm
Hi! I’ve been searching for the solution since two weeks (I also need to create a table just containing the p-values of the variables) and I’ve found your article today! Thank you so much! It does work! Fantastic!
sunnynil said,
April 9, 2011 at 12:21 am
Thank you! This helps a lot