Learn R Programming

bamdit (version 1.0-1)

metadiag: Bayesian Meta-Analysis of diagnostic test data

Description

This function performers a Bayesian meta-analysis of diagnostic test data by fitting a bivariate random effects model. The number of true positives and false positives are modeled with two conditional Binomial distributions and the random-effects are based on a bivariate scale mixture of Normals. Computations are done by calling (Just Another Gibbs Sampler) to perform MCMC (Markov Chain Monte Carlo) sampling and returning an object of the class mcmc.list.

Usage

metadiag(data, re="normal", link="logit", R = matrix(c(1, 0, 0, 1),
byrow=TRUE, nrow=2), m.0 = c(0,0), pre.mu = c(0.25, 0.25), k = 3, 
nu.0 = 1, n.chains = 3, n.iter = 40000, n.burnin = 20000, 
n.thin = 10, verbose = TRUE)

Arguments

data
A data frame with 4 columns containing the true positives, number of patients with disease, false positives, number of patients without disease
re
Random effects distribution for the resulting model. Possible values are normal and scalemix
link
The link function used in the model. Possible values are logit and cloglog.
R
A 2x2 matrix parameters for the prior of Lambda, default value is matrix(c(1, 0, 0, 1), byrow=TRUE, nrow=2)
m.0
A two dimensional vector for the priors of mu, where the default values are c(0, 0)
pre.mu
A two dimensional vector for the precision of mu, where the defaults are c(0.25, 0.25)
k
The degrees of freedom for the Wishart prior of Lambda. Default: 3
nu.0
The parameter for the prior of nu, default value is nu.0=1
n.chains
Number of chains for the Models. default: 3
n.iter
Number of Iterations. iter-burnin = obtained values. default: 40k
n.burnin
Number of Iterations that are skipped at the beginning of the simulation. Default: 20k
n.thin
Default: 10
verbose
Default: TRUE

Examples

Run this code
## execute analysis
data(mri)
mri
md <- metadiag(mri, re = "scalemix")
summary(md)

Run the code above in your browser using DataLab