forv i = 1/10{
if mod(`i',2)==0 gen z`i' = rnormal()
if mod(`i',2)==1 gen z`i' = runiform()
}
i want to generate random number but i am getting only empty variable list please try to help me
Related Posts with generate random number using loop
Cosinor analysis on iodine dispersionHello stata users, I am trying to perform a cosinor analysis to determine the effect of season on i…
Identifying coworkers in spell dataI have a dataset of worker employment spells, and I would like a general way to identify an individu…
Simpson paradox, how to visualize positive tendency when the coefficient doesnt outweigh absolute coefficient of the neg. general tendency?Hi everyone, I would like to have your opinion of the following. I am performing a regression on th…
Expanding Observations on Panel dataI have the following data: Code: * Example generated by -dataex-. To install: ssc install dataex …
Calculate median collecting observations from different variables in wide formatDear all, my data structure looks like this. good 1 price 1 good 2 price 2 etc. milk 43 egg 4…
Subscribe to:
Post Comments (Atom)
0 Response to generate random number using loop
Post a Comment