brxx_Cor {brxx}R Documentation

brxx_Cor: Bayesian Estimation of Reliability from Correlation

Description

This function estimates reliability from a correlation

Usage

brxx_Cor(x, y, alpha, beta, iter, burn, seed, CI, S0, nu0, mu0, items)

Arguments

x

First variable.

y

Second variable.

alpha

Prior true score variance (covariance between tests)

beta

Prior error variance (product of standard deviations minus covariance)

iter

Number of iterations for the Gibbs sampler.

burn

Number of samples to burn in.

seed

Seed for the Gibbs sampler

CI

Credible interval quantile, as a decimal (ie, for 95 percent, 0.95).

S0

Prior variance covariance matrix.

nu0

Prior degrees of freedom for inverse Wishart prior distribution.

mu0

Prior means for each column.

items

Number of test items.

Value

Returns median posterior estimates of the variance covariance matrix.

Examples

set.seed(999)
your_data=mvrnorm(n=15,mu=c(0,0),Sigma=matrix(c(4,5,5,9),nrow=2,ncol=2))
x=your_data[,1]
y=your_data[,2]
Mu0=c(0,0)
Sigma0=matrix(c(1,0.6,0.6,4),nrow=2,ncol=2)
Nu0=3-1
brxx_Cor(x=x,y=y,iter=5000,burn=2500,seed=999,CI=0.95,
mu0=Mu0,S0=Sigma0,nu0=Nu0,items=10)


[Package brxx version 0.1.2 Index]