Hi all,

I have a panel data set where I want to conditionally delete observations. In my case, I am studying funds. I want to delete all funds that have even one observation of Total Net Assets (TNA) under 5 million. This means I want to delete all the observations of the fund at once and not just the observations of the fund that have a "TNA" under 5. Below I've written down an example to clarify what I mean.

What is currently happening is that when I try to delete fund 1 with the commands below, only observations 1 and 2 will be deleted of fund 1. However, I aim to delete the whole of fund 1 at once.

Commands used:
xtset fund date
by fund (date), sort: drop if tna < 5

Example:
Fund: Date: TNA:
1 01/01 4
1 01/02 4
1 01/03 6
1 01/04 6
2 01/01 20
2 etc. 20
2 20
2 20

Thank you in advance.