BookmarkSubscribeRSS Feed
diogofor
Calcite | Level 5

 

Hello guys,

I'm doing my master thesis which consists on performing thousands of simple linear regressions around earnings announcements. So, I have several earnings announcements (the date of each earning announcement is the day 0) which I have to regress from day0-300 to day0-46, on the market index.

 

I have 3 datasets, the Market dataset (returns on S&P), the CRSP dataset (returns on stocks) and the Earnings dataset.

 

To run each regression, I start with an observation from the Earnings datset from which I get an earning announcement date which is linked to a specific company. And then, I perform the regression based on the estimation range mentioned before (using the time-series from Market dataset and CRSP dataset). The Earnings dataset and the CRSP dataset should be linked by PERMNO.

 

The objective is to add to every observation in the Earnings dataset an intercept and a slope.

 

To start, can you tell me how can I perform multilple simple linear regressions and extract just the intercept and the slope for each of them?

 

Thank you in advance, hope you can help me!

1 REPLY 1
PaigeMiller
Diamond | Level 26

In PROC REG, you can use the BY statement to perform the regression multiple (thousands of) times, and the OUTEST option will create a dataset that contains the slopes and intercepts.

--
Paige Miller

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 718 views
  • 2 likes
  • 2 in conversation