View source: R/bayeslmsamples.R
bayeslmsamples | R Documentation |
Draws from the posterior distribution for Bayesian linear models for paired comparison data
bayeslmsamples(
iter,
noitems,
nocompars,
scores,
vars = 1,
muprior = zeros(noitems, 1),
varprior = vars * diag(noitems),
Edges = c(1, 2, 1, 3, 2, 3),
prior = "conju",
data = NULL,
type = "simulated"
)
iter |
The number of posterior draws. |
noitems |
The number of items for the paired comparison. |
nocompars |
A vector of pairwise comparisons among |
scores |
The true scores or merits of |
vars |
The true constant variance of |
muprior |
The normal prior mean for |
varprior |
The prior covariance matrix of |
Edges |
The edge set of |
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 |
data |
he data containing the comparison outcomes; defalut is NULL. |
type |
The type of data to analyze: "simulated" (the default) for simulated data, "real" for a given real dataset. |
Posterior draws from cpcbayeslm
Prince P. Osei and Ori Davidov
## A graph of three items
## K <- 3 # number of items
## Kedges <- c(1,2,1,3,2,3) # edge set
## compars <- rep(3,3) # pairwise comparisons
## Tscores <- 1:3-mean(1:3) # The true score sum to zero
## bayeslmsamples(100,K,compars,Tscores,Edges=Kedges)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.