Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Re: Ordinal dependent variable

From   "Joseph Coveney" <>
To   <>
Subject   st: Re: Ordinal dependent variable
Date   Sat, 21 Jul 2012 15:41:23 +0900

Julie A. Lamoureux wrote:

I have a dataset with repeated measures (longitudinal data) in 2 separate groups
that I have set up as panel data.  Most of my dependent variables are numeric so
the analyses were straightforward.  My question concerns 3 variables that are
ordinal with 3 categories (rarely, sometimes, often).  The tool was used at
baseline and at 6 months and the researcher is interested in knowing if the
change over time in those 3 variables is different between the groups.  What is
the best approach to use in this case?


This seems in many ways the same situation as in another current thread (see the

thread titled, "signranktest for groups").  Although the approaches shown in 
that thread do not use so-called change scores, you can test for differences in
baseline-adjusted 6-month scores for each of your three variables in the same 
ways as mentioned there.

Again, the user-written commands -emh- and -gologit- mentioned in that thread
are available from SSC.

If you're willing to make assumptions about constancy of thresholds over time,
orthogonality of fixed and random effects, and you have a reasonably large 
sample, then you could use -gllamm- (yet another user-written command available
from SSC) to model difference in change-over-time as the treatment-by-time 
interaction term (see below).  For that approach, you might want to first 
Google "change scores" AND Harrell, and scan through some of the hits.

Joseph Coveney

* Create fake dataset for illustration
clear *
set more off
set seed `=date("2012-07-21", "YMD")'
quietly set obs 250
generate int patient = _n
generate byte treatment = _n > _N / 2
generate double u = runiform()
generate byte score0 = 1 + floor(3 * (runiform() + u) / 2)
generate byte score6 = 1 + floor(3 * (runiform() + u) / 2)
replace score6 = min(3, score6 + treatment) if runiform() < 0.2

* Nonparametric
emh score6 treatment, anova strata(score0) trans(modridit)

* Parametric
quietly tabulate score0, generate(baseline)
gologit2 score6 treatment baseline2 baseline3, autofit nolog

* Change over time
drop baseline?
quietly reshape long score, i(patient) j(time)
generate byte trtXtim = treatment * time
ologit score treatment time trtXtim, cluster(patient) nolog
gllamm score treatment time trtXtim, i(patient) ///
    family(binomial) link(ologit) adapt nolog


*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index