23.10.2012 Views

View PDF Version - RePub - Erasmus Universiteit Rotterdam

View PDF Version - RePub - Erasmus Universiteit Rotterdam

View PDF Version - RePub - Erasmus Universiteit Rotterdam

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix<br />

Discriminant analysis using a MLMM with a normal mixture 169<br />

We briefly show here how to run the MCMC sampling and perform subsequent<br />

discrimination with the PBC data in R using the extended version of the R package<br />

mixAK (Komárek14 ). It is assumed that the training data for both groups are stored<br />

in data.frames called Data0 and Data1 whose structure is depicted in Table 4.<br />

Note that it is not necessary that at each visit, measurements of all three markers<br />

have been taken. For example, for patient id=1, the bilirubin value at his last<br />

visit at time 119.69 is unknown. Nevertheless, the values of albumin and alkaline<br />

phosphatase obtained at this visit are still used in the estimation of the mixed model.<br />

The MCMC algorithm to obtain a sample from the posterior distribution of model<br />

parameters in Group 0 in a model with K = 2 mixture components (specified within<br />

the argument prior.b) is run using the following code. The sampled values and<br />

additional information are stored in an object mod0.<br />

¿ library(”mixAK”)<br />

¿ mod0 ¡- GLMM˙MCMC(y = Data0[, c(”bili”, ”albu”, ”lap”)],<br />

dist = c(”gaussian”, ”gaussian”, ”gaussian”),<br />

id = Data0[, ”id”],<br />

x = list(bili = Data0[, c(”age”, ”dosis”)],<br />

albu = Data0[, c(”age”, ”dosis”)],<br />

lap = Data0[, c(”age”, ”dosis”)]),<br />

z = list(bili = Data0[, ”time”],<br />

albu = Data0[, ”time”],<br />

lap = Data0[, ”time”]),<br />

random.intercept = c(bili = TRUE, albu = TRUE, lap = TRUE),<br />

prior.b = list(Kmax = 2),<br />

nMCMC = c(burn = 5000, keep = 10000, thin = 10, info = 500))<br />

Basic summary statistics of the posterior distribution can be seen (output not shown)<br />

with<br />

¿ print(mod0)<br />

Similarly, the sample from the posterior distribution of model parameters in Group 1<br />

can be obtained and stored in an object mod1.<br />

Further suppose that the values of the observed longitudinal markers and related<br />

covariates for new patients are stored in a data.frame DataNew which has the same<br />

structure as shown in Table 4. The values of Pg,i(τ) fori∈ group of new patients

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!