linear2btl: Linear Coefficients to Bradley-Terry-Luce (BTL) Estimates

Description Usage Arguments Details Value References See Also Examples

View source: R/linear2btl.R

Description

Transforms linear model coefficients to Bradley-Terry-Luce (BTL) model parameter estimates.

Usage

1
linear2btl(object, order = FALSE)

Arguments

object

an object of class glm or lm specifying a BTL model

order

logical, does the model include an order effect? Defaults to FALSE

Details

The design matrix used by glm or lm usually results from a call to pcX. It is assumed that the reference category is the first level.

The covariance matrix is estimated by employing the delta method.

See Imrey, Johnson, & Koch (1976) for more details.

Value

btl.parameters

a matrix; the first column holds the BTL parameter estimates, the second column the approximate standard errors

cova

the approximate covariance matrix of the BTL parameter estimates

linear.coefs

a vector of the original linear coefficients as returned by glm or lm

References

Imrey, P.B., Johnson, W.D., & Koch, G.G. (1976). An incomplete contingency table approach to paired-comparison experiments. Journal of the American Statistical Association, 71, 614–623.

See Also

eba, eba.order, glm, pcX.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(drugrisk)
y1 <- t(drugrisk[,,1])[lower.tri(drugrisk[,,1])]
y0 <-   drugrisk[,,1][ lower.tri(drugrisk[,,1])]

## Fit BTL model using glm (maximum likelihood)
btl.glm <- glm(cbind(y1, y0) ~ 0 + pcX(6), binomial)
linear2btl(btl.glm)

## Fit BTL model using lm (weighted least squares)
btl.lm <- lm(log(y1/y0) ~ 0 + pcX(6), weights=y1*y0/(y1 + y0))
linear2btl(btl.lm)

eba documentation built on May 29, 2017, 4:26 p.m.

Related to linear2btl in eba...