help midas simdataalso see: midas

Title

midas simdata -- Simulate a bivariate diagnostic test accuracy meta-analysis dataset

Syntax

midas simdata,
n(#)
logits(# #)
varlogits(# #)
[options]

Description

midas simdata generates a simulated dataset of 2x2 diagnostic test
accuracy tables suitable for use with midas meta-analysis commands.
Studies are simulated under the bivariate random-effects model: logit(Se)
and logit(Sp) are drawn from a bivariate normal distribution with specified
means, variances, and correlation, then binomial counts are generated for
each study.

The simulated dataset contains variables tp, fp, fn,
and tn saved to disk and loaded into memory.

Required options

n(#) number of subjects per study (diseased and
non-diseased combined).

logits(ls lp) expected logit sensitivity (ls) and
logit specificity (lp). For example, logits(2.0 2.5) corresponds
to mean sensitivity of invlogit(2.0) = 0.88 and specificity of
invlogit(2.5) = 0.92.

varlogits(vs vp) between-study variance of logit
sensitivity (vs) and logit specificity (vp). Both must be
non-negative.

Options

studies(#) number of studies to simulate. Default is studies(10).

p(#) prevalence of disease (proportion of subjects who are
diseased). Default is p(0), which splits subjects equally between
diseased and non-diseased.

r(#) ratio of non-diseased to diseased subjects within
each study. Default is r(0.5).

corr(#) correlation between logit(Se) and logit(Sp)
across studies. Range: -1 to 1. Default is corr(0.5).

path(string) directory path for the temporary data file
used during simulation. Defaults to the current working directory.

Examples

Simulate 20 studies with moderate accuracy and heterogeneity:

. midas simdata, n(100) studies(20) logits(2.0 2.5) varlogits(0.5 0.5)

. midas mle tp fp fn tn, id(study)

Simulate with high correlation between Se and Sp:

. midas simdata, n(200) studies(15) logits(1.5 2.0) varlogits(0.3 0.3) corr(0.8)

Saved results

The simulated dataset is saved to disk as midastemp.dta in the
specified path (or current directory), then loaded into memory with
variables:

tp true positives

fp false positives

fn false negatives

tn true negatives

Author

Ben A. Dwamena, University of Michigan.

bdwamena@umich.edu

Also see

midas, midas con2bin, midas ord2bin