PEMGUI: GUI for Bayesian Prevalence Estimation under...

Description Usage Arguments Details Value Note See Also Examples

Description

This function provides a GUI for the function rrisk.BayesPEM.

Usage

1
2
PEMGUI(x = 20, n = 20, k = 10, prior.pi = c(1, 19), prior.se = c(1, 1),
 prior.sp = c(1, 1), chains = 3, burn = 1000, update = 10000, thin = 1)

Arguments

x

Scalar value for number of pools (k>1) or single outcomes (k = 1) with positive test result.

n

Scalar value for number of pools tested (k>1) or the sample size in application study (k = 1).

k

Scalar value for number of individual samples physically combined into one pool.

prior.pi

Numeric vector containing parameters of a beta distribution as prior for prevalence pi, e.g., pi ~ prior.pi(*,*) = beta(*,*).

prior.se

Numeric vector containing parameters of a beta distribution as prior for sensitivity se, e.g., se ~ prior.se(*,*) = beta(*,*).

prior.sp

Numeric vector containing parameters of a beta distribution as prior for specificity sp, e.g., sp ~ prior.sp(*,*) = beta(*,*).

chains

Positive single numeric value, number of independent MCMC chains (default 3).

burn

Positive single numeric value, length of the burn-in period (default 1000).

update

positive single numeric value, length of update iterations for estimation (default 10000).

thin

Positive single numeric value (default 1). The samples from every kth iteration will be used for inference, where k is the value of thin. Setting thin > 1 can help to reduce the autocorrelation in the sample.

Details

The diagnostic parameters se and sp are defined at the pool level, equivalent to missclass='pool' in rrisk.BayesPEM function. See rrisk.BayesPEM for more details.

Value

The function PEMGUI returns an instance of the bayesmodelClass class containing following information

convergence

Logical, whether the model has converged (assessed by the user).

results

Data frame containing statitsics of the posterior distribution.

jointpost

Data frame giving the joint posterior probability distribution.

nodes

Names of the parameters jointly estimated by the Bayes model.

model

Model in rjags/JAGS (originally BRugs/Winbugs) syntax as a character string.

chains

Number of independent MCMC chains.

burn

Length of burn-in period.

update

Length of update iterations for estimation.

Note

The convergence of the model is assessed by the user using diagnostic plots.

See Also

rrisk.BayesPEM

Examples

1
2
3
4
5
6
#------------------------------------------
# Example of PEM model. Without parameters,
# the input fields will show default values
#------------------------------------------

mod <- PEMGUI()

BfRstats/rriskBayes2 documentation built on May 5, 2019, 2:42 p.m.