Sim.Data.STS {Surrogate} | R Documentation |
Simulates a dataset that can be used to assess surrogacy in the single-trial setting
Description
The function Sim.Data.STS
simulates a dataset that contains the variables Treat, Surr, True, and Pat.ID. The user can specify the total number of patients, the desired R_{indiv}
value (also referred to as the adjusted association (\gamma
) in the single-trial meta-analytic setting), and the desired means of the surrogate and the true endpoints in the experimental and control treatment groups.
Usage
Sim.Data.STS(N.Total=2000, R.Indiv.Target=.8, Means=c(0, 0, 0, 0), Seed=
sample(1:1000, size=1))
Arguments
N.Total |
The total number of patients in the simulated dataset. Default |
R.Indiv.Target |
The desired |
Means |
A vector that specifies the desired mean for the surrogate in the control treatment group, mean for the surrogate in the experimental treatment group, mean for the true endpoint in the control treatment group, and mean for the true endpoint in the experimental treatment group, respectively. Default |
Seed |
The seed that is used to generate the dataset. Default |
Details
The generated object Data.Observed.STS
(of class data.frame
) is placed in the workspace (for easy access).
Author(s)
Wim Van der Elst, Ariel Alonso, & Geert Molenberghs
See Also
Sim.Data.MTS
, Single.Trial.RE.AA
Examples
# Simulate a dataset:
Sim.Data.STS(N.Total=2000, R.Indiv.Target=.8, Means=c(1, 5, 20, 37), Seed=1)