Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Re: Simulated data
From
Janet Hill <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Re: Simulated data
Date
Thu, 30 Aug 2012 21:06:22 +0100 (BST)
I have a variable which is an integer in the range 0-20 and I have compared 3 groups using the Kruskal-Wallis test:
. kwallis x,by(_j)
Kruskal-Wallis equality-of-populations rank test
+---------------------+
| _j | Obs | Rank Sum |
|----+-----+----------|
| 1 | 20 | 705.00 |
| 2 | 20 | 395.50 |
| 3 | 20 | 729.50 |
+---------------------+
chi-squared = 11.363 with 2 d.f.
probability = 0.0034
chi-squared with ties = 11.467 with 2 d.f.
probability = 0.0032
A referee has accepted this in a paper but has added the comment "The authors should investigate the power of this test using simulated datasets, as they are using Stata for the analysis this is trivial".
It may be trivial to the referee and people who understand such things but I have no idea how to simulate data to test this.
I would be grateful if somebody could give me some advice on how to generate such data.
I am using Stata 12.
Thank you,
Janet
*
* 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/