dbm {pmr} | R Documentation |
Distance-based Models
Description
Distance-based Models for ranking data. The distance-based models assume that rankings closer to the modal ranking are more likely to be observed.
Usage
dbm(dset, dtype="tau")
Arguments
dset |
a ranking dataset |
dtype |
type of distance between two rankings. tau : Kendall's tau, rho : Spearman's rho, rho2 : Spearman's rho square, foot : footrule |
Details
Fit the distance-based models for the dataset and return a mle object. Standard methods on mle (e.g., @coef, @vcov) apply. The modal ranking and the Chi-square residual are given in the output.
Author(s)
Paul H. Lee and Philip L. H. Yu
See Also
Examples
library(pmr)
## create an artificial dataset
X1 <- c(1,1,2,2,3,3)
X2 <- c(2,3,1,3,1,2)
X3 <- c(3,2,3,1,2,1)
n <- c(6,5,4,3,2,1)
test <- data.frame(X1,X2,X3,n)
## fit the distance-based model with Spearman's rho distance
## dbm(test,dtype="rho")
[Package pmr version 1.2.5.1 Index]