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!
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.