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

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!

1 ACCEPTED SOLUTION

Accepted Solutions
aiste
Fluorite | Level 6

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!

 

View solution in original post

3 REPLIES 3
mkeintz
PROC Star
Please show the code you would use to estimate alpha and beta for a fixed estimation period. Then we might be able to make useful suggestions on how to replicate that code for variable estimation periods. Also what range of estimation periods do you intend to examine?
--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
aiste
Fluorite | Level 6

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!

aiste
Fluorite | Level 6

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!

 

sas-innovate-2024.png

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.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 472 views
  • 0 likes
  • 2 in conversation