WLErel(theta, error, w = rep(1, length(theta)))
EAPrel(theta, error, w = rep(1, length(theta)))
theta
estimates and let $s$ denote
the average of the squared error
. Then, the WLE reliability is
defined as $1-s/v=(v-s)/v$ while the EAP reliability is defined as
$1 - s/(s+v) = v/(s+v)$.
#############################################################################
# EXAMPLE 1: Toy example for reliability functions
#############################################################################
set.seed(9897)
N <- 100
# simulate theta and error SDs
x <- stats::rnorm(N,sd=2)
error <- stats::runif(N, .7 , 1.3)
# compute WLE reliability
WLErel(x,error)
# compute EAP reliaility
EAPrel(x,error)
Run the code above in your browser using DataLab