Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: comparison between a repeated ordinal measures

From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: comparison between a repeated ordinal measures
Date   Fri, 01 Apr 2005 06:46:32 +0900

Joseph Wagner wrote:

Thank you Nick. That was the problem. I now get:

   Nonparametric test for trend in hlths
   with eval, stratified by id
   z =  0.30,  chi-squared(1) =   0.09,  P>|z| = 0.7617

which confirms my other results.


Results from the do-file (taken, I thought, from the table that Joseph posted) 
are summarized below.  I've reposted the do-file modified to include the t 
test.  I can privately send Joseph the log if he has trouble running it.  (It's 
not clear why -gllamm- doesn't see any observations in his attempts.)

The parametric methods (-gllamm- and -mvtest-/-ttest-) are slightly more 
powerful than the nonparametric methods, but all would lead to the same 

-ologit, -cluster()- tests a different hypothesis, so I wouldn't expect that it 
would give the same results.  I haven't examined the proportional odds 
assumption.  It might also contribute to the difference, but if so I would have 
expected that to show up also in -gllamm-'s results to some extent.  Roger 
Newson's -somersd, cluster()- agrees with -ologit, cluster()-.

   Stata command         P
--------------------    ----
-signtest-              0.58
-signrank-              0.51
-npt_s-                 0.52
-gllamm-, Wald          0.48
-gllamm-, LR            0.48
-mvtest- or -ttest-     0.49

-somersd , cluster()-   0.73
-ologit, cluster()-     0.73

In any event, it seems that the answer to Joseph's original post's question is, 
"Yes.  Philip Ender's -mvrepeat- is appropriate for use here."

Joseph Coveney

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
reshape long cou, i(sco0) j(sco1)
log using A:\HealthScores.log, text replace
tabulate sco0 sco1 [fweight = cou], gamma taub
drop if cou == 0
expand cou
drop cou
mvrepeat sco0 sco1  // or . . .
ttest sco0 = sco1  // or . . .
generate byte del = sco1 - sco0
ttest del = 0  // I believe how Prof. D'Agostino couched it.
drop del
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
log close

*   For searches and help try:

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