Predict pairwise win probabilities from an alpha-adjusted Bradley-Terry fit
Source:R/bt_alpha.R
predict.pairwiseLLM_bt_alpha.RdCalculate plogis(theta1 - theta2), the probability that the first item
wins. These plug-in probabilities do not integrate over uncertainty and have
no tie, lapse, or positional parameter.
Usage
# S3 method for class 'pairwiseLLM_bt_alpha'
predict(object, newdata = NULL, ...)Arguments
- object
An alpha-adjusted fit from
fit_bt_model()withengine = "alpha".- newdata
A data frame containing
object1andobject2item IDs.NULLuses the original comparisons in their original order. IDs must be nonmissing and present in the fitted model. Repeated pairs are allowed; comparing an item with itself returns 0.5.- ...
Reserved; additional arguments are rejected.
Examples
comparisons <- data.frame(object1 = c("a", "a", "b"),
object2 = c("b", "c", "c"), result = c(1, 1, 1))
fit <- fit_bt_model(comparisons, engine = "alpha", alpha = 0.5)
predict(fit)
#> [1] 0.7586094 0.9080573 0.7586094
predict(fit, data.frame(object1 = "c", object2 = "a"))
#> [1] 0.09194274