Sim.Data.STS | R Documentation |
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.
Sim.Data.STS(N.Total=2000, R.Indiv.Target=.8, Means=c(0, 0, 0, 0), Seed=
sample(1:1000, size=1))
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 |
The generated object Data.Observed.STS
(of class data.frame
) is placed in the workspace (for easy access).
Wim Van der Elst, Ariel Alonso, & Geert Molenberghs
Sim.Data.MTS
, Single.Trial.RE.AA
# Simulate a dataset:
Sim.Data.STS(N.Total=2000, R.Indiv.Target=.8, Means=c(1, 5, 20, 37), Seed=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.