I'm working on a project for my econometrics class and trying to replicate a few papers relating to Fama-French factor models. I got data from CRSP and Compustat, but I'm a bit unsure how to manipulate it appropriately in R. There's a column for the ticker, one for the date of the observation, and then many more for close price, market cap, cash, etc. etc..

I attached an image of the general format of the data: enter image description here

My questions are:

1) what's the most effective way to organize this so that I can run time series regressions?

2) How should I handle NA values? I don't want to drop entire tickers because they have NAs.

3) I'm also planning to measure company's exposure to their industry (tbd which factors I use). How can I group company's by industry given that I have their SIC IDs? Thanks!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.