Dear Madam/Sir,
I downloaded CRSP daily return data from 1998 to 2021 (44,603,238 observations, 11.3 GB) and data form is as follows:
Firm_ID date returns(ret) market_returns (vwretd) calender year(cyear)
11 01/01/2013 7 1.5 2014
11 01/02/2013 9 -10 2014
And I dropped observations that number of cases in a firm-year is below 200 and then run market model regressions to get predicted parameter (beta) and standard deviation of residual (rmse). However, sas window is closed without producing outputs repeately while running yearly regressions.
data c3;
count = 0;
do until (last.cyear);
set c2;
by cusip cyear;
count + 1;
end;
do until (last.cyear);
set c2;
by cusip cyear;
if count ge 200 then output;
end;
drop count;
run;
proc reg data=c3 outest=c4 plots=none;
by cusip cyear;
model ret=vwretd;
run;
It will be highly appreciated if you can advise me as to how to prevent SAS window closing while running regressions.
Sincerely,
Joon1
There is no way to prevent a SAS window closing. You can only fix the problem that is causing the window to close in the first place. To find out what is causing the problem we need to know a lot more about your SAS setup.
Are you using SAS Environment Manager, SAS Studio or the SAS Windowing Environment as your user interface? Is your SAS running locally on your PC or on a remote SAS server? How long does the program run for before SAS closes? Is it always the same duration or does it vary? If it always closes after running for say 1 hour that could point to a timeout setting cause.
There is no way to prevent a SAS window closing. You can only fix the problem that is causing the window to close in the first place. To find out what is causing the problem we need to know a lot more about your SAS setup.
Are you using SAS Environment Manager, SAS Studio or the SAS Windowing Environment as your user interface? Is your SAS running locally on your PC or on a remote SAS server? How long does the program run for before SAS closes? Is it always the same duration or does it vary? If it always closes after running for say 1 hour that could point to a timeout setting cause.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.