simulateMaxSprtData | R Documentation |
Simulate survival data for MaxSPRT computation
simulateMaxSprtData(
n = 10000,
pExposure = 0.5,
backgroundHazard = 0.001,
tar = 10,
nullMu = 0.2,
nullSigma = 0.2,
maxT = 100,
looks = 10,
numberOfNegativeControls = 50,
numberOfPositiveControls = 1,
positiveControlEffectSize = 4
)
n |
Number of subjects. |
pExposure |
Probability of being in target cohort. |
backgroundHazard |
Background hazard (risk of the outcome per day). |
tar |
Time at risk for each exposure |
nullMu |
Null distribution mean (at log HR scale) |
nullSigma |
Null distribution SD (at log HR scale) |
maxT |
Maximum time to simulate. |
looks |
Number of (evenly spaced) looks at the data. |
numberOfNegativeControls |
Number of negative controls to simulate. |
numberOfPositiveControls |
Number of positive controls to simulate. |
positiveControlEffectSize |
The true effect size of the positive controls. |
Simulate survival data for negative and positive controls. The data provides multiple looks at data accruing over time, with each look having more data than the one before. Systematic error for each outcome is drawn from the prespecified null distribution.
The outcome IDs are assigned sequentially starting at 1, with the first IDs used for the negative controls, and the latter IDs used for the positive controls.
A data frame with 5 variables:
Time from index date to either the event or end of observation, whichever came first
Whether the outcome occurred (1) or not (0)
Whether the subject was exposed (TRUE) or not (FALSE)
The time point when the look occurred.
A unique identifier for data corresponding to a single outcome. Lower IDs indicate negative controls, higher IDs indicate the positive control
data <- simulateMaxSprtData(n = 1000)
head(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.