May 31, 2006

Saving PROC REG output in SAS dataset

Posted in SAS, SAS programming at 1:15 pm by Sneha

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.

Advertisements

26 Comments »

  1. Anonymous said,

    Google

    Google news and reviews

  2. damn all these beautiful gir. Corrina Eudora.

  3. they’ll have you suicidal suicida. Liesbeth Kiki.

  4. Idetrorce said,

    very interesting, but I don’t agree with you
    Idetrorce

  5. apurv said,

    Thank you for posting this. It saved me time and having to write a macro!

  6. Gab said,

    Thanks, very usefull

  7. sotoDyptomi said,

    I am often searching for new infos in the world wide web about this topic. Thankz.

  8. Liping said,

    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! πŸ˜€

  9. sunnynil said,

    Thank you! This helps a lot

  10. klonopin said,

    Everyone loves it whenever people come together and share views.
    Great blog, stick with it!

  11. I love to share understanding that I have built up through the
    12 months to help enhance group performance.

  12. I drop a comment when I especially enjoy a article on a blog
    or if I have something to valuable to contribute to the conversation.
    It’s triggered by the sincerness communicated in the article I looked at. And after this post Saving PROC REG output in SAS dataset | Numberspeak. I was excited enough to leave a comment πŸ˜‰ I actually do have a couple of questions for you if you don’t mind.
    Is it simply me or do a few of the responses look like left by brain dead individuals?

    πŸ˜› And, if you are posting on other sites, I’d like to follow anything new you have to post. Could you list the complete urls of your communal pages like your twitter feed, Facebook page or linkedin profile?

  13. phentermine said,

    I have read so many articles or reviews about the blogger lovers except this paragraph is truly
    a good article, keep it up.

  14. I know this site gives quality based articles and additional data, is there any
    other site which provides these kinds of data in quality?

  15. http://Deadtrigger2Hackapk.Wordpress.com said,

    Actually, the backdrop was obviously a green screen or a blue screen. One
    final comment, those who stop using opiates may occasionally become wanderers always searching for something to fill that emptiness inside.
    If you maintain your airsoft sniper rifle regulary,
    It won’t ever allow you to down.

  16. Attractive component to content. I simply stumbled upon your blog and in accession capital to claim that I acquire actually loved account your blog posts.
    Anyway I will be subscribing in your augment and even I
    success you get entry to consistently fast.

  17. We say to them, “this will likely be good for you” or “there weren. The Sons of Confederate Veterans honor ancestry through the preservation of background heritage. Much of this apparently was something in the last straw in transforming you from the Pasadena product into an ironist.

  18. You realize that there was never anything to produce, you just needed to relax, let
    go, be open as the universe, and accept Primordial Nature as
    your own Original Nature. That’s why careful consideration is
    called for if you are thinking about purchasing
    another home. Hulbert: What do you think about the generation that first embraced Jonathan Livingston Seagull.

  19. As the Cherry Blossom season coincides with both the fiscal and calendar years
    in Japan, it marks the arrival of new beginnings –
    students start their first day of school and new employees start their first
    day of work. From 1782 to 1786, Phu Quoc was a stronghold of Lord Nguyen Anh
    and later Emperor Gia Long, in his confrontation with Tay Son forces.
    Anybody who comes to France to learn will most definitely end up pleased by the experience.

  20. As the Cherry Blossom season coincides with both the fiscal
    and calendar years in Japan, it marks the arrival of new beginnings – students start their first day of school and new employees
    start their first day of work. From 1782 to 1786, Phu Quoc
    was a stronghold of Lord Nguyen Anh and later Emperor Gia Long, in his confrontation with Tay Son forces.
    As the name suggests it is the furniture of the green house.

  21. pinterest said,

    First, Pinterest users should have more creative options to customize the home page.
    Founded in March 2010, Pinterest has become the fastest-growing social media site on the
    web, gaining 145% more users since January 2012 alone.

    With Pinterest, you can pin a picture of your customers and include a blurb of the case
    study or testimonial.

  22. politruk.tk said,

    Saving PROC REG output in SAS dataset | Numberspeak
    Hi there! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up losing months of hard work due to no back up.

    Do you have any methods to stop hackers?

  23. Thiss is a topic that is near tto my heart… Many thanks!

    Exactly whre aare yiur contact details though?

  24. Ci sono le scarpiere sottoletto, chiuse antipolvere e con le ruote.nmagari cosu00ec risolvi. Click https://twitter.com/moooker1


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: