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

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

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.

View solution in original post

1 REPLY 1
SASKiwi
PROC Star

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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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