**
****
**Biopsies: discrete variable

latent class model

**
**Spiegelhalter and Stovin (1983) presented data on repeated biopsies of transplanted hearts, in which a total of 414 biopsies had been taken at 157 sessions. Each biopsy was graded on evidence of rejection using a 4 category scale of none (O), minimal (M), mild (+) and moderate-severe (++). Part of the data is shown below.

b

t

where b

The appropriate graph is shown below, where the role of the true state t

The BUGS code for this model is given below. No initial values are provided for the latent states, since the forward sampling procedure will find a configuration of starting values that is compatible with the expressed constraints. We also note the apparent ``cycle'' in the graph created by the expression nbiops[i] <- sum(biopsies[i,]). This will lead Such ``cycles'' are permitted provided that they are only data transformation statements, since this does not affect the essential probability model.

model

{

for (i in 1 : ns){

nbiops[i] <- sum(biopsies[i, ])

true[i] ~ dcat(p[])

biopsies[i, 1 : 4] ~ dmulti(error[true[i], ], nbiops[i])

}

error[2,1 : 2] ~ ddirich(prior[1 : 2])

error[3,1 : 3] ~ ddirich(prior[1 : 3])

error[4,1 : 4] ~ ddirich(prior[1 : 4])

p[1 : 4] ~ ddirich(prior[]); # prior for p

}

Results

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