Sim.Data.STS: 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.
The total number of patients in the simulated dataset. Default \(2000\).
R.Indiv.Target
The desired \(R_{indiv}\) (or \(\gamma\)) value in the simulated dataset. Default \(0.80\).
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 c(0, 0, 0, 0).
Seed
The seed that is used to generate the dataset. Default sample(x=1:1000, size=1), i.e., a random number between 1 and 1000.
Details
The generated object Data.Observed.STS (of class data.frame) is placed in the workspace (for easy access).