My data looks like the one below.
and I want to delete the observations that dont have hhid (the three empty cells) conditional that the 'test' variable/column is 1,2, and 3
hhid test
101014002017101 1
101014002017101 2
101014002017101 3
101014002017101 4
101014002028401 1
101014002028401 2
101014002028401 3
101014002028401 4
101014002029701 1
101014002029701 2
101014002029701 3
101014002029701 4
101014002029701 5
101014002029701 6
101014002029701 7
101014002029701 8
1
2
3
101014002029701 4
101014002040901 1
101014002040901 2
101014002040901 3
101014002040901 4