I have a panel dataset and want to create a random dummy variable with mean 0.2 that marks a random subpart of the dataset. This would work with some code like this

Code:
set seed 2803
gen id = _n
gen random = runiform()
sort random
local cut = round((_N / 10) * 2)
gen sample = _n <= `cut'
drop random
However, I want to impose the restriction that each individual i and each time period t is marked at least once by this dummy, i.e. is present in the sample. Any ideas on how to approach this?