Hi
I am new to STATA. I want to generate a random variable with integer between 0 and 4 satisfying certain distribution, such as the percentage of 0 is 9%, 1 is 6%, 2 is 5%, 3 is 40% and 4 is 40%. How can I do that? I tried gen a=runiformint(0,4) with if conditions. Appreciate any help.
Related Posts with Generate data subject to pre specified distribution
Meta Analysis for one group - no control group.Hi all, I am conducting a systematic review and meta analysis that will investigate health-related …
Interpretation of Adjusted Predictions Contrasts (Margins command)Dear Statalist, I am new to the Margins command and would really appreciate some help with interpre…
Two step system GMMHi I run two step system GMM and the assumption that all the variable is exogenous; but might not s…
Regressing an interaction of two independent variables, of which one should get lower and one higher, on a dependent variableHi everyone! I want to perform a linear regression with two interacting independent variables but I…
HP filter panel dataHello, I am PhD student and I am new to stata. I am trying to create an hp trend for variable TourPr…
Subscribe to:
Post Comments (Atom)
0 Response to Generate data subject to pre specified distribution
Post a Comment