Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

itempar.PlackettLuce

Extract Item Parameters of Plackett-Luce Models


Description

Methods for itempar to extract the item parameters (worth or log-worth) from a Plackett-Luce model or tree. In the case of a tree, item parameters are extracted for each terminal node.

Usage

## S3 method for class 'PlackettLuce'
itempar(object, ref = NULL, alias = TRUE, vcov = TRUE, log = FALSE, ...)

## S3 method for class 'pltree'
itempar(object, ...)

## S3 method for class 'PLADMM'
itempar(object, ref = NULL, alias = TRUE, vcov = TRUE, log = FALSE, ...)

Arguments

object

a fitted model object as returned by PlackettLuce, pladmm, or pltree.

ref

a vector of labels or position indices of item parameters which should be used as restriction/for normalization. If NULL (the default), all items are used with a zero sum (log = TRUE) or unit sum (log = FALSE) constraint.

alias

logical. If TRUE (the default), the aliased parameter is included in the return vector (and in the variance-covariance matrix if vcov = TRUE). If FALSE, it is removed. If the restriction given in ref depends on several parameters, the first parameter of the restriction specified is (arbitrarily) chosen to be removed if alias is FALSE.

vcov

logical. If TRUE (the default), the (transformed) variance-covariance matrix of the item parameters is attached as attribute vcov. If FALSE, a NA-matrix is attached.

log

logical. Whether to return log-abilities (TRUE) or abilities (FALSE).

...

further arguments which are currently not used.

Value

An object of class "itempar", see itempar.

Examples

R <- matrix(c(1, 2, 0, 0,
              4, 1, 2, 3,
              2, 1, 1, 1,
              1, 2, 3, 0,
              2, 1, 1, 0,
              1, 0, 3, 2), nrow = 6, byrow = TRUE)
colnames(R) <- c("apple", "banana", "orange", "pear")

mod <- PlackettLuce(R)
coef(mod)

# equivalent to default coefficients, i.e. log abilities
itempar(mod, ref= 1, log = TRUE)

# abilities, normalized so abilities for apple and pear sum to 1
itempar(mod, ref = 1:2)

PlackettLuce

Plackett-Luce Models for Rankings

v0.4.0
GPL-3
Authors
Heather Turner [aut, cre] (<https://orcid.org/0000-0002-1256-3375>), Ioannis Kosmidis [aut] (<https://orcid.org/0000-0003-1556-0302>), David Firth [aut] (<https://orcid.org/0000-0003-0302-2312>), Jacob van Etten [ctb] (<https://orcid.org/0000-0001-7554-2558>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.