Hello,
I have a question regarding fixed effects. I want to analyze the selling behavior of investors on the stock market. Therefore, I have transaction data of retail investors showing whether a stock was purchased or not including the price, the number of stocks, the date, investor identifier, the stock identifier (cusip) and a sell indicator (equal to 1 if the stock was sold) and so on. Now, I want to run a regression with the sell indicator being the dependent variable and I want to include time- and investor fixed effects. I know that I can declare my dataset with
to a panel data set and then apply
to include time and investor fixed effects. My problem is that investor and date do not uniquely identify my data because an investor can buy multiple times on the same day. It is also not possible to do
as I have over 100,000 investors and therefore Stata is not able to run this code. I read in other posts that I can just use
and then apply
but I am not sure whether this is the right way to go.
I would be grateful if someone could help me with this issue!
I have a question regarding fixed effects. I want to analyze the selling behavior of investors on the stock market. Therefore, I have transaction data of retail investors showing whether a stock was purchased or not including the price, the number of stocks, the date, investor identifier, the stock identifier (cusip) and a sell indicator (equal to 1 if the stock was sold) and so on. Now, I want to run a regression with the sell indicator being the dependent variable and I want to include time- and investor fixed effects. I know that I can declare my dataset with
Code:
xtset investor date
Code:
xtreg sell etc. i.date, fe
Code:
reg sell etc. i.date i.investor
Code:
xtset investor
Code:
xtreg
I would be grateful if someone could help me with this issue!
Comment