Programming the statistical procedures from SAS

Regression

Accepted Solution Solved
Reply
Occasional Contributor H_G
Occasional Contributor
Posts: 18
Accepted Solution

Regression

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


Accepted Solutions
Solution
‎06-23-2013 03:55 PM
Respected Advisor
Posts: 4,606

Re: Regression

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


All Replies
Solution
‎06-23-2013 03:55 PM
Respected Advisor
Posts: 4,606

Re: Regression

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
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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