Open kauedesousa opened 3 years ago
Thanks for digging down to find the cause of this issue.
The addition of pseudo rankings allows the worth to be estimated, but these pseudo rankings are removed before estimating the variance-covariance matrix. If an item is then completely missing from the rankings this leads to zero rows and columns in the Information matrix which makes it non-invertible, so the variance can't be estimated. I am not sure what the appropriate fix should be here but will follow this up (it may be a few months before I get to it as prioritising work on PLADMM in May/June).
AIC.pltree()
doesn't need to compute the variance-covariance matrix, that was throwing an error due to a call to itempar()
which defaults to vcov = TRUE
. I have replaced this call and made a PR to the master branch; once that's merged in AIC(pl, newdata = dt)
should work if you install the package from GitHub. However as newdata
is actually the original data used in the fit here, it would be better to simply call AIC(pl)
which avoids even more unnecessary computation and should work with the current PlackettLuce release (0.4.0). (This also goes for the call to predict - better not to specify newdata
unless you are specifying data that is different from the data used in the fit!)
Dear Heather,
Here comes an issue that may be related to issue https://github.com/hturner/PlackettLuce/issues/25. But now I think we have a better clue on where is the problem, which arrises mostly when we are performing cross-validations and pltree() is exposed to a set of data with a weak network.
Here is an example
The question is, do you think that this problem can be solved with npseudo (eventually) or should we deal with it by passing vcov = FALSE to the predict() method?
Thanks in advance