cpcbayeslm | R Documentation |
This function performs Bayesian inference for cardinal paired comparison data. The methodology allows for doing Bayesian analysis on restricted parameter space
cpcbayeslm(
noitems,
nocompars,
scores,
vars = 1,
xmu = zeros(noitems, 1),
xvar = vars * diag(noitems),
a0 = 2,
b0 = 1,
Edges = c(1, 2, 1, 3, 2, 3),
data = NULL,
datatype = "simulated",
prior = "conju",
tol = 1e-08
)
noitems |
The number of items for the paired comparison. |
nocompars |
A vector of the number of pairwise comparisons among |
scores |
The true scores or merits of |
vars |
The constant variance of |
xmu |
The normal prior mean of |
xvar |
The prior covariance matrix of |
a0 |
The prior shape of inverse gamma distribution; default is 2. |
b0 |
The prior scale of inverse gamma distribution; default is 1. |
Edges |
The edge set of |
data |
The data containing the comparison outcomes; defalut is NULL. |
datatype |
The type of data to analyze: "simulated" (the default) for simulated data, "real" for a given real dataset. |
prior |
The type of prior: "conju" (default) for conjugate prior, "semi-conju" for semi-conjugate prior, "flat" for flat prior, and "ref" for reference prior |
tol |
The tolerance value to control near zero eigen values; default is 1e-08. |
The Bayesian posterior mean and variance together with the least squares estimates.
Prince P. Osei and Ori Davidov
Osei, P. P. and Davidov, O. (2022). Bayesian linear models for cardinal paired comparison data. Comp. Stat and Data Analysis Vol 172, 107481.
K = 3 # number of items
paircompars <- rep(3,3) # number of pairwise comparisons
Tscores <- 3:1-mean(3:1) # true scores
cpcbayeslm(K,paircompars,Tscores)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.