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?
Re: FitstatHello! I ran the logistic regression. The command fitstat produced some statistics on the model fit…
Is it usual for ivprobit per se to run quickly but margins after that is very slow?ivprobit finished in may a few minutes. But I am waiting for hours for margins to finish. Is this no…
What is the command for Damerau-Levenshtein (DL) distance that allows for re-oderingDear Mr/Ms Helper I have tried Code: ustrdist but it seems do not allow re-ordering. Is there any …
Grouped Percentage Bar GraphHi Everyone, I am trying to make a stacked bar graph but having some trouble. I have three groups o…
outreg2Hello, I could not produce excel table from outreg. My command is simple as follows # In MS excel …
Subscribe to:
Post Comments (Atom)
0 Response to How to drop specific observations from dataset in Stata?
Post a Comment