Re: st: comparison between a repeated ordinal measures

 From "rengaweoj" To statalist@hsphsun2.harvard.edu Subject Re: st: comparison between a repeated ordinal measures Date Wed, 30 Mar 2005 13:40:18 -0000

```Thank you for your response.  My data is in -wide- format.  In order
to use -ologit- or -gllamm-, does my data necessarily need to be in
-long- format?  I am guessing that either I need to or I have set up
-ologit- and -gologit- incorrectly since the coefficient and p-value I
get are quite different.  Looking at the table it appears there isn't
a difference between the two time points and the results I get from

--- 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/

*
*   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/
```