Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Monte Carlo simulations


From   [email protected]
To   [email protected]
Subject   RE: st: Monte Carlo simulations
Date   Wed, 30 Jul 2008 22:19:05 -0300 (BRT)

Raphael, try the code below. you can change the standard deviations,
etc.... to get what you want.

*/----------- START-----------------------
clear
set obs 10
drawnorm mean1 mean2 mean3, means(0.09 0.11 0.18 ) sds(0.04 0.1 0.1)
gene id = _n
reshape long mean, i(id) j(group)
drop id
sort group
oneway mean group, scheffe tabulate
*/------------END-------------------------


This code will generate 3 groups with equal size (n=10 - in the example
above). You can create a loop to get a dataset with a specific
characteristics or copy-paste the cole below in  trial-error attempts.

Cheers!

Tiago


---------------------------------------------------------------


I would like to generate three groups of random numbers ranging
between 0.01 and 0.20, where one of the group is statistical
significant from the other groups. Can any one help?

Raphael

---------------------------------------------------------------
Please, try to be more specific.

You can generate three groups using several parameters. Furthermore, you
need to know the sample you want
to simulate. Are the groups of equal size?

Cheers!

Tiago

---------------------------------------------------------------
Lets say the grou

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index