bomega: bomega: Bayesian Estimation of Coefficient Omega

Description Usage Arguments Value Examples

View source: R/bomega.R

Description

This function estimates coefficient omega internal consistency reliability.

Usage

1
bomega(K, mod, alpha, beta, CI)

Arguments

K

The number of test items.

mod

A measurement model estimated as a bsem object by blavaan.

alpha

Prior true score variance.

beta

Prior error variance.

CI

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

Value

Returns estimated median and quantile based credible limits for omega.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
your_data=data.frame(mvrnorm(n=20,mu=c(0,0,0,0,0),
Sigma=matrix(c(4,2,2,2,2,
              2,4,2,2,2,
              2,2,4,2,2,
              2,2,2,4,2,
              2,2,2,2,4),
            nrow=5, ncol=5)))
colnames(your_data)=c("x1","x2","x3","x4","x5")
mod='tau=~x1+x2+x3+x4+x5'
fit=bsem(mod,data=your_data)
bomega(K=5,mod=fit,alpha=3.51,beta=1.75,CI=0.95)

brxx documentation built on Jan. 26, 2021, 5:06 p.m.