This is very helpful. Please, how do you generate a variable that counts the unique number of firms? In this case of your data set there are 3 firms, each with unique id 1, 2 and 3.
@thedatahall
Жыл бұрын
Bys firm:generate total=_N
@cerdascendekia1851
Жыл бұрын
Thank you for the videos. It is very useful. Btw, how can we identified the first data row in a panel data? Let say I wan to calculate return on each value in row _n divided by the first row.
@thedatahall
Жыл бұрын
bys firm (year): gen a=stock_price[_n]/stock_price[1]
Пікірлер: 6