data(diabetes)
#
ranks <- tcc(treat = t, studlab = study, event = r, n = n, data = diabetes,
mcid = 1.20, sm = "OR", small.values = "desirable")
#
pdat <- ranks$ppdata
#
ldat <- pp2long(pdat)
head(ldat)
library("PlackettLuce")
ungrouped.preferences <-
rankings(ldat, id = "id", item = "treat", rank = "rank")
grouped.preferences <-
as.rankings(ungrouped.preferences,
index = as.numeric(as.factor(pdat$studlab)))
#
fit <- PlackettLuce(grouped.preferences)
#
coef(summary(fit, ref = ranks$reference.group))[, 1]
# Results stored in mtrank()
mtrank(ranks)$estimates$log_ability
Run the code above in your browser using DataLab