# NOT RUN {
model <- mtc.model(smoking)
# To save computation time we load the samples instead of running the model
# }
# NOT RUN {
results <- mtc.run(model)
# }
# NOT RUN {
results <- dget(system.file("extdata/luades-smoking.samples.gz", package="gemtc"))
ranks <- rank.probability(results)
print(ranks)
## Rank probability; preferred direction = 1
## [,1] [,2] [,3] [,4]
## A 0.000000 0.003000 0.105125 0.891875
## B 0.057875 0.175875 0.661500 0.104750
## C 0.228250 0.600500 0.170875 0.000375
## D 0.713875 0.220625 0.062500 0.003000
print(sucra(ranks))
## A B C D
## 0.03670833 0.39591667 0.68562500 0.88175000
print(rank.quantiles(ranks))
## 2.5% 50% 97.5%
## A 3 4 4
## B 1 3 4
## C 1 2 3
## D 1 1 3
plot(ranks) # plot a cumulative rank plot
plot(ranks, beside=TRUE) # plot a 'rankogram'
# }
Run the code above in your browser using DataLab