I have data with 156 variables and 10000 observations. Values of one variable are from 2 to 16 (only even) and I need to select 4 randomly selected values from this variable and keep them in data. I tried to use surveyselect procedure, but it doesn't work. I also thought about using ranuni, but don't know how to create even number:(
Here is the example data. I want ot select these observations with for example a=2 or 4 or 6 or 8, the I don't know the value and I want to get the random one from available.
and desired output in my example with a=2,4,6,8 would be observations 1,2,3,4,5,6,7,8,9,10,12,13,16.
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!