Dear collegues,
I'm working on a consumer survey. In this survey, we asked to consumers to rank their three preferred labelling schemes among a pool of ten alternatives.
So, for each consumers, we have his rank 1, rank 2 and rank 3. In the exemple provide below, the consumer 1 ranked the alternative 7 at rank1, the alternative 5 at rank 2 and the alternative 4 at rank 3.
Array
My question is: Do you know how I can generate random variable (value between 1 and 10) without taking the values taken in the previous rows?
For exemple, here, i want to generate a value for the rank 4 between 1 and 10 without taking the value 7, 5 and 2. For the rank 5, generate value between 1 and 10 without taking the value 7,5, 2 and the one generate for rank 4 etc.
I hope I have made myself clear I remain available for any further informations,
Regards
Jean-François DEWALS
Related Posts with Generate random value stata
skewed-Normal GARCH Estimation Using ml command.Dear Statalist, I'm trying to generate conditional skewness and kurtosis by using Gram-Charlier Exp…
How to identify oldest children with highest education?Dear all, I have a household data and I want to generate a variable indicating year of birth of a c…
Identifying partial name overlap in string variablesHi. I have two datasets with the variable “Product”, the name of different pharma drugs. I am trying…
Change reference category of dependent variableHi, I am running the following code mlogit cq25 i.group [pweight = cq25pp], rrr The dependent var…
Split a string variable into character and numeric partsHi, I have a string variable (profile) in my dataset which includes prefixes of H, W, B and the suff…
Subscribe to:
Post Comments (Atom)
0 Response to Generate random value stata
Post a Comment