read.soc etc) so that they work for updated Preflib file
formats.pltree to allow option of modelling log-worth
with a linear predictor (via pladmm()).pladmm(),
including possibility to specify contrasts for any factors in the
formula.weights argument to pladmm(), allowing
aggregated rankings to be modelled, optionally using an
aggregate_rankings object to specify rankings and weights
together.predict.PLADMM(vcov = FALSE) and AIC when new
data specified (partial fix to #50).pladmm function to fit the Plackett-Luce model with
log-worth modelled by item covariates.beans data. The planting
date, and geographical coordinates (@kauedesousa, #41).all.equal().vcov.PlackettLuce() works again for
ref = NULL (bug introduced with vcov method in version
0.2-4)asplit()read.soi() and read.toi() now handle
incomplete rankings with very irregular lengths correctly.read.*() functions for Preflib formats now give a
meaningful error when the file or URL does not exist, and a warning if
the file is corrupt.as.rankings with input = "orderings" now
checks coded values can be matched to item names, if provided.PlackettLuce() now works with
nspeudo > 0 when there are no observed paired
comparisons.?PlackettLuce now gives advice on analysing data with
higher order ties.as.rankings.matrix() introduced in version
0.2-7.eigs from RSpectra vs rARPACK."aggregated_rankings" object to store aggregated
rankings with the corresponding frequencies. Objects of class
"rankings" can be aggregated via the aggregate
method; alternatively rankings() and
as.rankings() will create an
"aggregated_rankings" object when
aggregate = TRUE. as.rankings() also handles
pre-aggregated data, accepting frequencies via the freq
argument.freq() function to extract frequencies from
aggregated rankings.as.rankings() can now create a
"grouped_rankings" object, if a grouping index is passed
via the index argument.as.matrix() methods for rankings and aggregated
rankings to extract the underlying matrix of rankings, with frequencies
in the final column if relevant. This means rankings can be saved easily
with write.table().complete() and decode() functions to
help pre-process orderings before converting to rankings,
complete() infers the item(s) in r’th rank given the items
in the other (r - 1) ranks. decode() converts coded
(partial) orderings to orderings of the items in each ordering.read.soi(), read.toc() and
read.toi() to read the corresponding PrefLib file formats
(for data types “Strict Orders - Incomplete List”, “Orders with Ties -
Complete List” and “Orders with Ties - Incomplete List”). An
as.aggregated_rankings() method is provided to convert the
data frame of aggregated orderings to an
"aggregated_rankings" object.pltree() now respects na.action and will
pad predictions and fitted values for
na.action = "na.exclude" if the rankings are missing for a
whole group or one of the model covariates has a missing value.PlackettLuce() now has an na.action
argument for handling of missing rankings.fitted() and choices() now return data
frames, with list columns as necessary.rankings() now sets redundant/inconsistent ranks to
NA rather than dropping them. This does not affect the
final ranking, unless it is completely NA.read.soc() is now named Freq rather than
n."item" attribute of the data frame returned by
read.soc() is now named "items".labels argument in as.rankings() has
been deprecated and replaced by items.grouped_ranking() has been deprecated and replaced by
group().nascar data have been
dropped.isFALSE() for compatibility with R <
3.5.vcov() for CRAN Windows
test machine.PlackettLuce() now supports MAP estimation with a
multivariate normal prior on log-worths and/or a gamma prior on ranker
adherence.PlackettLuce() now returns log-likelihood and degrees
of freedom for the null model (where all outcomes, including ties, have
equal probability).vcov method for Plackett-Luce
trees.itempar.PlackettLuce() now always returns a matrix,
even for a single node tree.pltree() or PlackettLuce() with grouped
rankings now work correctly with weights."PlackettLuce" and
"summary.PlacketLuce" objects now respect
options("width").fitted always returns n which is now
weighted count of rankings (previously only returned unweighted count
with argument aggregate = TRUE).AIC.pltree to work on "pltree"
object with one node.AIC.pltree to enable computation of AIC on new
observations (e.g. data held out in cross-validation).fitted.pltree to return combined fitted
probabilities for each choice within each ranking, for each node in a
Plackett-Luce tree.vcov.PlackettLuce now works for models with non-integer
weights (fixes #25).plot.pltree now works for worth = TRUE
with psychotree version 0.15-2 (currently pre-release on
https://r-forge.r-project.org/R/?group_id=330)PlackettLuce and plfit now work when
start argument is set.itempar.PlackettLuce now works with
alias = FALSEplot.PlackettLuce method so that plotting works for
a saved "PlackettLuce" objectbeans
data (which has been updated).?PlackettLuce and new
package?PlackettLuce. (Fixes #14 and #21).maxit defaults to 500 in
PlackettLuce.steffensen argument).coef.pltree() now respects log = TRUE
argument (fixes #19).[.grouped_rankings] now works for replicated
indices.pudding, nascar and
beans.pltree() function for use with
partykit::mob(). Requires new objects of type
"grouped_rankings" that add a grouping index to a
"rankings" object and store other derived objects used by
PlackettLuce. Methods to print, plot and predict from
Plackett-Luce tree are provided.connectivity() function to check connectivity of a
network given adjacency matrix. New adjacency() function
computes adjacency matrix without creating edgelist, so remove
as.edgelist generic and method for `“PlackettLuce”
objects.as.data.frame methods so that rankings and grouped
rankings can be added to model frames.format methods for rankings and grouped_rankings,
for pretty printing.[ methods for rankings and grouped_rankings, to
create valid rankings from selected rankings and/or items.itempar method for “PlackettLuce” objects to obtain
different parameterizations of the worth parameters.read.soc function to read Strict Orders - Complete
List (.soc) files from https://www.preflib.org.Old behaviour should be reproducible with arguments
npseudo = 0, steffensen = 0, start = c(rep(1/N, N), rep(0.1, D))
where N is number of items and D is maximum
order of ties.
ref argument from PlackettLuce;
should be specified instead when calling coef,
summary, vcov or itempar.qvcalc generic now imported from
qvcalcPlackettLuce.log argument to coef so that worth
parameters (probability of coming first in strict ranking of all items)
can be obtained easily.