Reputation: 307
I use following codes to output regression results (residuals) into a new dataset(want). The regression result is rapidly represented in Results Viewer, while the new dataset cannot be created at the same time. Until now, I wait for around 30min and still don't get the new dataset.
My dataset include 2,500,000 observations. Is this the possible reason? or is there any problem in my code? Could anyone give me some suggestions?
If I also want the results of coefficient, what code should I add? Thanks
proc reg data=have;
model dmid=effhalfsp;
output out=want
r=effhalfspred;
run;
Upvotes: 0
Views: 456
Reputation: 12465
Try adding plots=none
.
outest=est_data_set
to output the estimates;
This generates 2,500,000 observations. The PROC REG
step runs in 1.1 seconds on my laptop and generates the output you are asking for.
data test;
do i=1 to 2500000;
x = rannor(1);
y = 10 + 1*x + rannor(1);
output;
end;
drop i;
run;
proc reg data=test outest=estimates plots=none;
model y=x;
output out=want r=resid;
run;
quit;
Make sure you add the quit;
or PROC REG
will keep running and waiting on more commands.
Upvotes: 2