BookmarkSubscribeRSS Feed
kernsaf
Calcite | Level 5

I have a data set (final) that I am trying to predict values from. I would like to predict writing score (write) from each permutation of math=70,90 and social studies (socst)=70,90.

My thoughts were to create a new data set with the desired math and social studies combos, concatenate the two, and then run proc reg with 95% CI (clb) to get the predicted values. However, while my combined data set has these values on my proc print, it has blanks for predicted values. Any idea what I'm doing wrong? Thank you!

*create new data set;

data new;

do math=70,90;

   socst=70;

  output;

end;

do math=70,90;

   socst=90;

   output;

end;

run;

*join data sets'

data final_pred1;

set new final;

run;

*use proc reg to get predicted writing scores;

proc reg data=final_pred1;

model write = math socst/clb;

run;

quit;

proc print data=final_pred1;

run;

2 REPLIES 2
Reeza
Super User

You haven't requested that proc reg provide any output.

Use the outest option on proc reg to generate a data set with predicted values.

RTM:

SAS/STAT(R) 9.2 User's Guide, Second Edition

Doc_Duke
Rhodochrosite | Level 12

to just get the values printed, use the CLI option (not CLB).  See

SAS/STAT(R) 13.1 User's Guide

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 726 views
  • 0 likes
  • 3 in conversation