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
Q about generating survey weight in combined NHANES cycleHello everyone. I have a question about creating/generating NHANES survey weight for the 2011-2012 a…
about xtqreg commandhello stata community, Can the xtqreg command be applied to a sample of 12 banks over 13 quarters (…
Fixed effect issue (deleting variables)Hi, I got a question related to my regression.In fact, I'm using merged datasets. first one is bank…
Parsing a string variable to extract a particular wordHello everyone, I need to extract the word INC or CORPORATION or INCORPORATED from the string varia…
stcrreg competing risk model with random interceptDear Stata community, I have run the Fine-Gray competing risk model using stcrreg and worked perfec…
Subscribe to:
Post Comments (Atom)
0 Response to Droping id with insufficient obs
Post a Comment