Hi all,
My question is about a panel data set for which in would like to regress a certain monthly score on holding period returns of equities. I'm getting to know Stata step by step and have done some reshaping and cleaning already but I cant seem to find the right way to handle this last part. Im dealing with 4 different monthly scores (0-100) and monthly holding period returns for 1000 equities in a time frame of 10 years.
The problem is the structure of the current dataset has a separate time variable for each combination of date - firm - 1/4 scores, which causes 4 identical date observations per company & return combination. I would like to ask for a way to delete the 'missing values' and combine the 4 score variables with 1 date variable row per firm.
The data currently looks like this:

I think it might be important to mention that the data is not complete for all dates or scores for some firms, also the order of the (non-missing) scores is not consistent.
Appreciate any help or tips, thank you very much in advance.
My question is about a panel data set for which in would like to regress a certain monthly score on holding period returns of equities. I'm getting to know Stata step by step and have done some reshaping and cleaning already but I cant seem to find the right way to handle this last part. Im dealing with 4 different monthly scores (0-100) and monthly holding period returns for 1000 equities in a time frame of 10 years.
The problem is the structure of the current dataset has a separate time variable for each combination of date - firm - 1/4 scores, which causes 4 identical date observations per company & return combination. I would like to ask for a way to delete the 'missing values' and combine the 4 score variables with 1 date variable row per firm.
The data currently looks like this:
I think it might be important to mention that the data is not complete for all dates or scores for some firms, also the order of the (non-missing) scores is not consistent.
Appreciate any help or tips, thank you very much in advance.

Comment