Dear Statalist users,
I am using Stata 17. I have unbalanced panel data with obs ranging from 1 to 300+ for N (cross-section). The data looks the following:
id month price
1 1 100
1 2 110
2 1 110
3 1 200
3 2 100
3 3 300
.........................
I want to drop ids with the number of obs < 50. I can do this manually like drop if id == 2 | id == 20 | and so on. How can I automate it as I have a large number of ids (N)?
Related Posts with Droping id with insufficient obs
file miest.ster already exists I have been trying to run some imputation modelling and am running into this error code when I try …
Converting quarterly string to Stata date formatDear all, I have a string variable "quarter" in the following format. How do I convert into the Stat…
Matching methodHi all, I have a cross-sectional dataset which contains info on 417 different funds. These funds be…
Stata takes the first group in categorical variables as the reference group?Hi, I happened to use a categorical variable without recoding it in a logit regression and found Sta…
Calculating Mean by every 100 observations?Hi , I have a huge dataset with 12000 observations with sample ID running in sequence (1-12000). I …
Subscribe to:
Post Comments (Atom)
0 Response to Droping id with insufficient obs
Post a Comment