R/Simulation.R
simulateMetaAnalysisWithNegativeControls.Rd
A function to simulate patient-level survival data for a hypothetical exposure, with simulated bias and data-source-specific random effects. Patient-level data for negative control outcomes are simulated as well to reflect systematic error.
simulateMetaAnalysisWithNegativeControls(
meanExposureEffect = log(2),
meanBias = 0.5,
biasStd = 0.2,
meanSiteEffect = 0,
siteEffectStd = 0.1,
mNegativeControls = 10,
nSites = 10,
sitePop = 2000,
seed = 42,
...
)
Average exposure effect; has to be on the log-scale
Average bias for the bias distribution
Standard deviation for the bias distribution
Average of the data-source-specific effects (typically should be zero)
Standard deviation for data-source-specific effects
Number of negative control outcomes
Number of data sources
Population size per data source
Random seed
Arguments that will be passed to other functions