Help using Base SAS procedures

Saving residuals of regression procedure in new data-set

Reply
Contributor
Posts: 23

Saving residuals of regression procedure in new data-set

Hi all,

 

 

I have a rather simple question. I want to create a new variable in my data-set with the residuals from a simple regression procedure. This is what I tried:

 

PROC reg data=a;

MODEL y=x;

OUTPUT out=b r=residual;

RUN;

 

However, when I try to open the data-set, it says:

ERROR: You cannot open 'dataset' for input access with record-level control because

'dataset' is in use by you in resource environment REG.

 

What am I doing wrong?

 

Thanks a lot!

 

Super User
Posts: 17,868

Re: Saving residuals of regression procedure in new data-set

PROC REG requires a QUIT; at the end, not just a RUN;

Ask a Question
Discussion stats
  • 1 reply
  • 157 views
  • 3 likes
  • 2 in conversation