Code:
set obs 1000 set seed 1 generate x = runiform()
Say I have variable 'x' which is uniform distribution variable and I wish to create Variable X where the values of 'x' are converted into a categorical variable and I specify the percentiles and theyre values where
Code:
'X' value in the percentile 0--28.9999 -> 'x' value of 1 'X' value in the percentile 29--31.9999 -> 'x' value of 2 'X' value in the percentile 32--97.999 -> 'x' value of 3 'X' value in the percentile 98--100 -> 'x' value of 4
Comment