BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
H_G
Calcite | Level 5 H_G
Calcite | Level 5

Hello,

I am running an OLS regression, I would like to use the predicted value of my dependent variable as a new variable.(I have to use the predicted variable in another regression)

can someone please help me how I can do it?

Thanks.

Best

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Most, if not all regression procedure accept statement OUTPUT for creating a new dataset with predicted values and residuals. Thus if you add a statement like

OUTPUT out=myPredData predicted=myPred;

you will get a new dataset named myPredData similar to your input dataset but with an extra column named myPred which you can use as input to another regression.

PG

PG

View solution in original post

1 REPLY 1
PGStats
Opal | Level 21

Most, if not all regression procedure accept statement OUTPUT for creating a new dataset with predicted values and residuals. Thus if you add a statement like

OUTPUT out=myPredData predicted=myPred;

you will get a new dataset named myPredData similar to your input dataset but with an extra column named myPred which you can use as input to another regression.

PG

PG

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1237 views
  • 0 likes
  • 2 in conversation