btreg: Bradley-Terry Regression Models

Description Usage Arguments Details Value References See Also Examples

Description

Extended Bradley-Terry models with subject- and object-specific variables fitted by means of log-linear (or logistic) regression models.

Usage

1
2
3
4
5
6
btreg(formula, data, subset, na.action, weights, offset,
  type = c("loglin", "logit"), ref = NULL, undecided = NULL, position = NULL,
  model = FALSE, y = TRUE, x = FALSE, ...)

btreg.fit(x, y, z = NULL, weights = NULL, type = c("loglin", "logit"), ref = NULL,
  undecided = NULL, position = NULL, ...)

Arguments

formula

A symbolic description of the model to be fit. This should be of type y | z1 + z2 ~ x1 + x2 + x3 where y should be an object of class paircomp, x1, x2, x3 are subject-covariates (taken from data) and z1 and z2 are object-covariates (taken from covariates(y)).

data

an optional data frame containing the variables in the model.

subset

an optional subset specification.

na.action

A function which indicates what should happen when the data contain NAs, defaulting to na.action.

weights

an optional vector of weights, interpreted as case weights (integer only).

offset

an optional offset vector (currently ignored).

type

character. Should an auxiliary log-linear Poisson model or logistic binomial be employed for estimation? The latter is only available if not undecided effects are estimated.

ref

character or numeric. Which object parameter should be the reference category, i.e., constrained to zero?

undecided

logical. Should an undecided parameter be estimated?

position

logical. Should a position effect be estimated?

model

logical. Should the model frame be included in the fitted model object?

x

matrix. The regressor matrix pertaining to the subject covariates. This can be returned in btreg if x = TRUE.

y

paircomp object with the response. This can be returned in btreg if y = TRUE.

z

matrix. The regressor matrix pertaining to the object covariates. This can be returned in btreg if x = TRUE.

...

further arguments passed to functions.

Details

btreg is a convenient formula-based interface for fitting Bradley-Terry models. It essentially handles the formula parsing and argument preprocessing and then calls btreg.fit, the workhorse fitting function. This suitably aggregates the data and then calls glm.fit (currently) for parameter estimation and postprocesses the results.

Currently, the fitting function only supports simple Bradley-Terry models of type y ~ 1, i.e., without any covariates. This will be extended in future versions.

Value

An object of class "btreg", i.e., a list with components including

coefficients

a vector of estimated coefficients,

vcov

covariance matrix of all coefficients in the model,

loglik

log-likelihood of the fitted model,

df

degrees of freedom,

estfun

empirical estimating functions (gradients),

weights

case weights used,

n

number of observations (subjects),

type

type argument used,

ref

ref argument used,

undecided

undecided argument used,

position

position argument used,

labels

vector of object labels,

call

the original function call,

terms

the original model terms,

model

the full model frame (if model = TRUE),

y

the response paircomp vector (if y = TRUE),

x

regressor matrix of subject covariates (if x = TRUE),

z

regressor matrix of object covariates (if x = TRUE),

References

Critchlow DE, Fligner MA (1991). Paired Comparison, Triple Comparison, and Ranking Experiments as Generalized Linear Models, and their Implementation in GLIM. Psychometrika, 56(3), 517–533.

Dittrich R, Hatzinger R, Katzenbeisser W (1998). Modelling the Effect of Subject-Specific Covariates in Paired Comparison Studies with an Application to University Rankings. Journal of the Royal Statistical Society C, 47(4), 511–525.

See Also

plot.btreg

Examples

1
2
3
4
5
6
7
8
9
## CEMS university choice data
data("CEMSChoice", package = "psychotree")

## Bradley-Terry modeling
cems <- btreg(preference ~ 1, data = CEMSChoice)
cems
summary(cems)
plot(cems)
worth(cems)

prefmod2 documentation built on May 2, 2019, 5:20 p.m.

Related to btreg in prefmod2...