# NOT RUN {
# }
# NOT RUN {
fit <- fit_Bayesian_FROC(BayesianFROC::dd,ite = 111)
e <- rstan::extract(fit)
# Check the retrun value is the desired one.
# apply(e$z, 2, var) == get_posterior_variance(fit,z)
# apply(e$mu, c(2,3), var) == get_posterior_variance(fit,mu)
# apply(e$v, c(2,3), var) == get_posterior_variance(fit,v)
# apply(e$ppp, c(2,3,4), var) == get_posterior_variance(fit,ppp)
#This code is OK, but R CMD check might say error cuz the object
# z, mu, v, ppp is not found
# apply(e$z, 2, var) == get_posterior_variance(fit,"z")
# apply(e$mu, c(2,3), var) == get_posterior_variance(fit,"mu")
# apply(e$v, c(2,3), var) == get_posterior_variance(fit,"v")
# apply(e$ppp, c(2,3,4), var) == get_posterior_variance(fit,"ppp")
# }
# NOT RUN {
#dontrun
# }
Run the code above in your browser using DataLab