BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
benjamin_2018
Fluorite | Level 6

Hello! I am using PROC REG to estimate parameters, and I want to use the estimated coefficients for significant (p<.05) variables to score a new dataset for observations which are missing the modeled variable. I can output the parameters using the outest= option but I don't know how to easily apply these parameters to the dataset which has known values for the independent variables but unknown values for the dependent variable. For example, 

 

ods output SelParmEst=reg_parms_&modeled_ind_var;
proc reg data=work.have;
&modeled_ind_var : model &modeled_ind_var = x y z/selection=backward sls=.05;
run;

I see a reference to a SCORE statement for PROC REG, but I must not have the right version of SAS? 

 

I can see this process done in 1 step using PROC DISCRIM, as below. 

%let discrim_var=y;
data missing_&discrim_var not_missing_&discrim_var;
set work.have;
if missing(&discrim_var) then output missing_&discrim_var;
else output not_missing_&discrim_var;
run;

proc discrim data=work.have  testdata=work.missing_&discrim_var testout=results_&discrim_var;
.......;
run;

Is there another procedure that I should be applying than PROC REG? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

 

BR, Koen

View solution in original post

3 REPLIES 3
sbxkoenk
SAS Super FREQ

 

BR, Koen

Tom
Super User Tom
Super User

Just use the normal OUTEST= option, like it shows in the examples for PROC SCORE.

proc reg data=work.have outest=reg_parms_&modeled_ind_var ;
&modeled_ind_var : model &modeled_ind_var = x y z/selection=backward sls=.05;
run;

Then use that dataset as the SCORE= dataset in your PROC SCORE call.

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1231 views
  • 0 likes
  • 3 in conversation