predictive.checks.AROC.bsp {AROC}R Documentation

Posterior predictive checks.

Description

Implements posterior predictive checks. Compares a selected test statistic computed based on the diagnostic test outcome in the nondiseased group against the same test statistics computed based on generated data from the posterior predictive distribution of the diagnostic test outcome in the nondiseased group obtained using a Bayesian normal linear regression model as discussed in Inacio de Carvalho and Rodriguez-Alvarez (2018).

Usage

predictive.checks.AROC.bsp(object, 
	statistics = c("min", "max", "median", "skewness"), devnew = TRUE)

Arguments

object

An object of class AROC as produced by AROC.bsp.

statistics

Character vector. Statistics to be used for the posterior predictive checking. By default, "min", "max", "median" and "skewness"

devnew

logical. If TRUE, each plot is depicted in a new graphic device.

Details

The following graphics are depicted: (1) histograms of the desired test statistics computed from a number of simulated datasets drawn from the posterior predictive distribution of the diagnostic test outcome in the nondiseased group. In these plots, the estimated statistics from the observed diagnostic test outcome in the nondiseased group are also depicted. (2) Kernel density estimates computed from a number of simulated datasets drawn from the posterior predictive distribution of the diagnostic test outcome in the nondiseased group. In these plots, the kernel density estimate of the observed diagnostic test outcome in the nondiseased group is also depicted. For a detailed discussion about predictive checks, see Gabry et al. (2017).

Value

As a result, the function provides a list with the following components:

yrep

Matrix. Each column corresponds to a dataset generated from the posterior predictive distribution of the diagnostic test outcome in the nondiseased group.

y0

Numeric vector. Observed diagnostic test outcome in the nondiseased group.

References

Gabry, J., Simpson, D., Vehtari, A., Betancourt, M., and Gelman, A. (2017). Visualization in Bayesian workflow. arXiv preprint arXiv:1709.01449.

Inacio de Carvalho, V., and Rodriguez-Alvarez, M. X. (2018). Bayesian nonparametric inference for the covariate-adjusted ROC curve. arXiv preprint arXiv:1806.00473.

See Also

AROC.bsp

Examples

library(AROC)
data(psa)
# Select the last measurement
newpsa <- psa[!duplicated(psa$id, fromLast = TRUE),]

# Log-transform the biomarker
newpsa$l_marker1 <- log(newpsa$marker1)

m1 <- AROC.bsp(formula.healthy = l_marker1 ~ age,
group = "status", tag.healthy = 0, data = newpsa, scale = TRUE,
p = seq(0,1,l=101), compute.lpml = TRUE, compute.WAIC = TRUE,
a = 2, b = 0.5, nsim = 5000, nburn = 1500)

predictive.checks.AROC.bsp(m1, statistics = "mean")



[Package AROC version 1.0-3 Index]