Learn R Programming

StatRank (version 0.0.6)

Evaluation.TVD: Calculates TVD between empirical pairwise preferences and modeled pairwise preferences

Description

Calculates TVD between empirical pairwise preferences and modeled pairwise preferences

Usage

Evaluation.TVD(Data.pairs, m, Estimate, pairwise.prob = NA, prior = 0, nonparametric = FALSE, ...)

Arguments

Data.pairs
data broken up into pairs using Breaking function
m
number of alternatives
Estimate
estimation object from an Estimate function
pairwise.prob
Function that given two alternatives from
prior
prior weight to put in pairwise frequency matrix
nonparametric
indicator that model is nonparametric (default FALSE) the the Parameters argument, returns back a model probability that one is larger than the other
...
additional arguments passed to generateC.model

Value

the TVD between modeled and empirical pairwise preferences, thinking of the probabilities as a probability distribution over the (n choose 2) pairs

Examples

Run this code
data(Data.Test)
Data.Test.pairs <- Breaking(Data.Test, "full")
m <- 5
Estimate <- Estimation.PL.GMM(Data.Test.pairs, m)
Evaluation.TVD(Data.Test.pairs, m, Estimate, PL.Pairwise.Prob)

Run the code above in your browser using DataLab