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

From |
"Michael Wood" <mwood@hunter.cuny.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: Re: comparison between a repeated ordinal measures |

Date |
Thu, 31 Mar 2005 16:10:31 -0500 |

Thanks to Joseph Coveney for an interesting illustration of Stata categorical commands and data reshaping. Joseph W. may want to consider dropping column 5 which has only one, unique observation, which will allow the use of Stata's -symmetry- command. Using the data prior to the -reshape long- command, symmetry sco0 sco1, contrib --------------------------------------------- | sco1 sco0 | 1 2 3 4 Total ----------+---------------------------------- 1 | 28 18 6 0 52 2 | 21 78 44 1 144 3 | 7 34 96 5 142 4 | 0 3 18 16 37 | Total | 56 133 164 22 375 --------------------------------------------- Contribution to symmetry Cells chi-squared -------------- -------------- n1_2 & n2_1 0.2308 n1_3 & n3_1 0.0769 n1_4 & n4_1 0.0000 n2_3 & n3_2 1.2821 n2_4 & n4_2 1.0000 n3_4 & n4_3 7.3478 chi2 df Prob>chi2 ------------------------------------------------------------------------ Symmetry (asymptotic) | 9.94 5 0.0770 Marginal homogeneity (Stuart-Maxwell) | 9.79 3 0.0205 ------------------------------------------------------------------------ The symmetry model fits, albeit poorly; the marginals are different. The main source of difference for the symmetry chi sq is respondents (n=5) who reported 3 at time0 and 4 at time1, versus those (n=18) who responded 4 at time0 and 3 at time1. Michael Wood <mwood@hunter.cuny.edu> > --- In statalist@yahoogroups.com, Joseph Coveney <jcoveney@b...> wrote: > > Joseph Wagner wrote > > > > I need to do a comparison between two ordinal measures, one at baseline > > (hlths) and the other, repeated at followup(f6hlths). I have done > > something similar in SAS using CATMOD. I wish to know if there has been > > a change between the two time points and in which direction. > > > > > > The data takes this form: > > > > > > Self Rated | 6M Self Rated Health > > Health | 1 2 3 4 5 | Total > > -----------+--------------------------+----- > > 1 | 28 18 6 0 0 | 52 > > 2 | 21 78 44 1 0 | 144 > > 3 | 7 34 96 5 1 | 143 > > 4 | 0 3 18 16 0 | 37 > > -----------+--------------------------+----- > > Total | 56 133 164 22 1 | 376 > > > > > > Is the command -mvrepeat- that Philip Ender wrote, appropriate? > > > > > ---------------------------------------------------------------------------- > > > > In this case, -mvrepeat- would give the same answer as -ttest- using the > > paired t-test syntax. I vaguely recall reading that under these > > circumstances Student's t-test does surprisingly well with ordinal > data with > > as few as three categories, but consider using an alternative, such as a > > nonparametric test or a modeling command intended for ordered > categorical > > data. There are several of each from which to choose. In addition > > to -ologit- (illustrated below), Stata has user-written commands > that don't > > rely upon the proportional odds assumption, at least one of which > > (-gologit-) allows the -cluster()- option. > > > > To observe the direction of change and its magnitude, you can either > > use -predict- after one of the modeling commands or plot the data > using a > > graphing command specifically for ordered categorical data. (I've > > illustrated using -ordplot-, but be aware that its author, Nick Cox, has > > enhanced it and updated it for Stata Release 8 under the name > > of -distplot-.) > > > > Joseph Coveney > > > > clear > > set more off > > input byte sco0 byte cou1 byte cou2 byte cou3 byte cou4 byte cou5 > > 1 28 18 6 0 0 > > 2 21 78 44 1 0 > > 3 7 34 96 5 1 > > 4 0 3 18 16 0 > > end > > reshape long cou, i(sco0) j(sco1) > > drop if cou == 0 > > expand cou > > drop cou > > signtest sco0 = sco1 > > signrank sco0 = sco1 > > generate int pid = _n > > reshape long sco, i(pid) j(tim) > > somersd tim sco, cluster(pid) > > ologit sco tim, cluster(pid) > > npt_s sco, by(tim) strata(pid) nodetail > > version 7: ordplot sco, by(tim) > > gllamm sco tim, i(pid) family(binomial) link(ologit) > > estimates store A > > gllamm sco, i(pid) family(binomial) link(ologit) > > estimates store B > > lrtest A B, stats > > exit > > * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**Re: st: comparison between a repeated ordinal measures***From:*Joseph Coveney <jcoveney@bigplanet.com>

**Re: st: comparison between a repeated ordinal measures***From:*"rengaweoj" <wagnerj@edc.pitt.edu>

- Prev by Date:
**RE: st: Inverse hyperbolic sine function** - Next by Date:
**Re: st: comparison between a repeated ordinal measures** - Previous by thread:
**Re: st: comparison between a repeated ordinal measures** - Next by thread:
**RE: st: comparison between a repeated ordinal measures** - Index(es):

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