Hello SAS pros,
I have a question related to the event study I am doing. In my sample I have many different ISIN codes and multiple events per ISIN (here I attach one ISIN code with 3 events as an example (su3.sas7bdat)).
I have created variable "semaine" which indicates estimation period (denoted by numbers 1-40) and observation period (denoted by numbers 41-43).
I need to find a different intercept alpha and a different parameter beta using different estimation periods and I am not sure how to do it.
I need to basically regress returns_perc ~ alpha^ + beta^mswrld_perc + e and to identify different alpha and beta values for each estimation period. For this file I attach, I should have three different alphas and respectively three different betas. In my original sample, I have many more. I was wondering what would be the fastest automatic way to do it?
Many thanks in advance!
If anyone faces the same problem - I have a solution. I created a value denoting the events --> an additional column saying event_nb=1,2,3... etc. E.g. event_nb=1 stays equal to 1 for the 43 weeks per event.
Then I did:
PROC REG NOPRINT DATA=dataset (WHERE=(semaine LE 40))
OUTEST=Betas;
MODEL returns_perc = mswrld_perc /SSE;
BY event_nb;
RUN;
QUIT;
Maybe it'll be useful for someone else!
I used this but it gives me the values based on the whole sample, not taking into account the value of my variable "semaine".
And I need it to perform only when "semaine" is equal from 1 to 40.
proc reg data=dataset noprint OUTEST=interc;
model returns_perc=MSWRLD_perc/ clb;
output out=AR_main r=abret;
run;
If you have any suggestions, I'd be happy to try them!
If anyone faces the same problem - I have a solution. I created a value denoting the events --> an additional column saying event_nb=1,2,3... etc. E.g. event_nb=1 stays equal to 1 for the 43 weeks per event.
Then I did:
PROC REG NOPRINT DATA=dataset (WHERE=(semaine LE 40))
OUTEST=Betas;
MODEL returns_perc = mswrld_perc /SSE;
BY event_nb;
RUN;
QUIT;
Maybe it'll be useful for someone else!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.