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

Hello,

 

I am carrying out an event study application. At the moment, I have some troubles in setting the Event Window. Differently from other questions asked in the community, my events are endogenous. I am using a dummy variable named jumps_pa to detect such events. I should require to set an event window going from t-30 to t+30, where t is the event date. For each event, I need to set such an event window, keeping the data in the columns exc_retadj retidio below for the preceding and following dates.  

 

my data are daily data, sorted by permno, and  arise after several steps from crsp datbase. in particular, they look like this

 

permno  date     exc_retadj   retidio    jumps_pa

10000    1/01/x                                        1 if jump, 0 if no jump.

....             ....                                            .....

Could anybody help  create a table to sort data according to my needs?

 

Thanks

 

Riccardo 

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

Hello @RDellaVilla ,

This is exactly the same question as in the "statistical procedures" board if I am right.

Over there you have accepted my solution, so I paste it once again.

I do not have the 'power' to merge both questions into one.

data have;
input permno date jumps_pa;
informat date ddmmyy10.;
format date exc_retadj retidio ddmmyy10.;
exc_retadj = INTNX('DAY',date,-30,'SAME');
retidio    = INTNX('DAY',date,+30,'SAME');
cards;
10000 21/01/2021 1
;
run;
/* end of program */

Cheers,

Koen

View solution in original post

1 REPLY 1
sbxkoenk
SAS Super FREQ

Hello @RDellaVilla ,

This is exactly the same question as in the "statistical procedures" board if I am right.

Over there you have accepted my solution, so I paste it once again.

I do not have the 'power' to merge both questions into one.

data have;
input permno date jumps_pa;
informat date ddmmyy10.;
format date exc_retadj retidio ddmmyy10.;
exc_retadj = INTNX('DAY',date,-30,'SAME');
retidio    = INTNX('DAY',date,+30,'SAME');
cards;
10000 21/01/2021 1
;
run;
/* end of program */

Cheers,

Koen

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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