Add pseudo-rank to missing values
pseudo_rank(object, ...)a matrix or PlackettLuce rank
library("PlackettLuce")
R = matrix(c(1, 2, 0, 0,
4, 1, 0, 3,
2, 1, 0, 3,
1, 2, 0, 0,
2, 1, 0, 0,
1, 0, 0, 2), nrow = 6, byrow = TRUE)
colnames(R) = c("apple", "banana", "orange", "pear")
# summary(PlackettLuce(R))
R = pseudo_rank(R)
summary(PlackettLuce(R))
#> Recoded rankings that are not in dense form
#> Call: PlackettLuce(rankings = R)
#>
#> Coefficients:
#> Estimate Std. Error z value Pr(>|z|)
#> apple 0.0000 NA NA NA
#> banana 0.4000 0.9081 0.440 0.660
#> orange -2.9297 1.6843 -1.739 0.082 .
#> pear -0.8705 1.0581 -0.823 0.411
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual deviance: 12.015 on 17 degrees of freedom
#> AIC: 18.015
#> Number of iterations: 8