Hello,
I have a large dataset but I do not need all observations. The dataset contains data for every day within the period from 1989 to 2019. How can I delete all observations in Stata except for the last day of each year and for each company? (the variable name and format is attached with the image)
Example:
Permno Data n Ret alpha ....
1001 31dec1989
1001 31dec1990
1001 31dec1991
...
1001 31dec2019
1002 31dec1989
1002 31dec1990
...
Thank you very much!
Best regards
Sven
Array
Related Posts with How to drop specific observations from dataset in Stata?
Westerlund error-correction-based panel cointegration testsDear all, I am trying to do panel cointegration test using xtwest command or using Westerlund(2007) …
Inserting knot locations in stpm2 when degree of freedom is 1.Hi there, I am running a flexible parametric model with 2 knots (I know this is equivalent to weibu…
Converting numeric values into timeHello! In my dataset, I have a column "time_out" which has numeric values such as 17.45 or 18.36 et…
Stata command: ScalarHey Guys, i am a master's degree student in finance. For my master thesis i model the value at risk…
Constant term P value is zeroIn my OLS regression. I am getting a p-value for constant is zero. what it signifies.i have heard it…
Subscribe to:
Post Comments (Atom)
0 Response to How to drop specific observations from dataset in Stata?
Post a Comment