Closed kauedesousa closed 6 years ago
Thanks for the report. The failure comes in computing the variance-covariance matrix, so for now it may be sufficient to use
predict(tree, newdata = beans, vcov = FALSE)
and similarly
itempar(tree, vcov = FALSE)
Unfortunately this isn't a workaround for plot
as this doesn't pass on the vcov
argument. I will look into why the vcov part isn't working for a proper fix.
library(PlackettLuce)
example("beans", package = "PlackettLuce") G <- grouped_rankings(R, rep(seq_len(nrow(beans)), 4))
weights <- c(rep(0.3, 400), rep(1, 442))
tree <- pltree(G ~ maxTN, data = beans, alpha = 0.05, weights = weights )
plot(tree) #does not work
predict(tree, newdata = beans)
predict fails when model is made with weights and type is "itempar". Works with the other options.