likelihood_ratio: Likelihood-ratio test

View source: R/likelihood_ratio.R

anova.PlackettLuceR Documentation

Likelihood-ratio test

Description

Assesses the goodness of fit of competing statistical models

Usage

## S3 method for class 'PlackettLuce'
anova(object, ...)

likelihood_ratio(x, split, ...)

Arguments

object

an object of class PlackettLuce

...

additional arguments passed to methods

x

an object of class rankings or grouped_rankings

split

a vector indicating the splitting rule for the test

Details

The test compares a Plackett-Luce model fitted to all data with separate models fitted within each group defined by split. The degrees of freedom are the sum of the ranks (number of estimated parameters) of the group models minus the rank of the global model. When a group has no ties, its tie parameter is fixed at zero, at the boundary of the parameter space, and the chi-square p-value is approximate.

Value

A data.frame with the deviance, the degrees of freedom (DF_delta) and the p-value of the chi-square test

Author(s)

Joost van Heerwaarden and KauĂȘ de Sousa

Examples

library("PlackettLuce")
example("beans", package = "PlackettLuce")
G = group(R, rep(seq_len(nrow(beans)), 4))
d = cbind(G, beans)

split = ifelse(d$maxTN < 18.7175, TRUE, FALSE)

likelihood_ratio(G, split)

mod = PlackettLuce(G)

anova(mod)


gosset documentation built on Dec. 2, 2026, 1:08 a.m.