**
****
**Inhaler: ordered categorical data

Ezzet and Whitehead (1993) analyse data from a two-treatment, two-period crossover trial to compare 2 inhalation devices for delivering the drug salbutamol in 286 asthma patients. Patients were asked to rate the clarity of leaflet instructions accompanying each device, using a 4-point ordinal scale. In the table below, the first entry in each cell (r,c) gives the number of subjects in Group 1 (who received device A in period 1 and device B in period 2) giving response r in period 1 and response c in period 2. The entry in brackets is the number of Group 2 subjects (who received the devices in reverse order) giving this response pattern.

The response R

R

where a

logitQ

where b

m

m

m

m

where b represents the treatment effect, p represents the period effect and k represents the carryover effect. The probability of subject

The

model

{

#

# Construct individual response data from contingency table

#

for (i in 1 : Ncum[1, 1]) {

group[i] <- 1

for (t in 1 : T) { response[i, t] <- pattern[1, t] }

}

for (i in (Ncum[1,1] + 1) : Ncum[1, 2]) {

group[i] <- 2 for (t in 1 : T) { response[i, t] <- pattern[1, t] }

}

for (k in 2 : Npattern) {

for(i in (Ncum[k - 1, 2] + 1) : Ncum[k, 1]) {

group[i] <- 1 for (t in 1 : T) { response[i, t] <- pattern[k, t] }

}

for(i in (Ncum[k, 1] + 1) : Ncum[k, 2]) {

group[i] <- 2 for (t in 1 : T) { response[i, t] <- pattern[k, t] }

}

}

#

# Model

#

for (i in 1 : N) {

for (t in 1 : T) {

for (j in 1 : Ncut) {

#

# Cumulative probability of worse response than j

#

logit(Q[i, t, j]) <- -(a[j] + mu[group[i], t] + b[i])

}

#

# Probability of response = j

#

p[i, t, 1] <- 1 - Q[i, t, 1]

for (j in 2 : Ncut) { p[i, t, j] <- Q[i, t, j - 1] - Q[i, t, j] }

p[i, t, (Ncut+1)] <- Q[i, t, Ncut]

response[i, t] ~ dcat(p[i, t, ])

cumulative.response[i, t] <- cumulative(response[i, t], response[i, t])

}

#

# Subject (random) effects

#

b[i] ~ dnorm(0.0, tau)

}

#

# Fixed effects

#

for (g in 1 : G) {

for(t in 1 : T) {

# logistic mean for group i in period t

mu[g, t] <- beta * treat[g, t] / 2 + pi * period[g, t] / 2 + kappa * carry[g, t]

}

}

beta ~ dnorm(0, 1.0E-06)

pi ~ dnorm(0, 1.0E-06)

kappa ~ dnorm(0, 1.0E-06)

# ordered cut points for underlying continuous latent variable

a[1] ~ dflat()T(-1000, a[2])

a[2] ~ dflat()T(a[1], a[3])

a[3] ~ dflat()T(a[2], 1000)

tau ~ dgamma(0.001, 0.001)

sigma <- sqrt(1 / tau)

log.sigma <- log(sigma)

}

Note that the data is read into

Results

A 1000 update burn in followed by a further 10000 updates gave the parameter estimates