Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Using ksmirnov


From   Morrison Hodges <hodge002@umn.edu>
To   Statalist <statalist@hsphsun2.harvard.edu>
Subject   st: Using ksmirnov
Date   Wed, 5 Sep 2012 09:41:14 -0500

I'm trying to use ksmirnov to compare 2 distributions to determine if there are any differences in the distribution of the variables.

I have a .dta file with 179 patients. Each patient is classified as being in one of 7 groups from 1 to 7, i.e., group==1, group==2, etc. I want to compare the same variable between 2 groups. All variables are already sorted, from lowest to highest.

'ksmirnov' requires by(groupvar). I tried:

ksmirnov var, by(group==1, group==3)

and I get an error message that says "invalid variable in by() option.

I tried: ksmirnov jumps if group==1 | group==3, by(group)
and also got an error method. Can someone help? Thanks, Morry Hodges
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index