View source: R/SimDataSTSBinBin.R
| Sim.Data.STSBinBin | R Documentation |
The function Sim.Data.STSBinBin simulates a dataset that contains four (binary) counterfactuals (i.e., potential outcomes) and a (binary) treatment indicator. The counterfactuals T_0 and T_1 denote the true endpoints of a patient under the control and the experimental treatments, respectively, and the counterfactuals S_0 and S_1 denote the surrogate endpoints of the patient under the control and the experimental treatments, respectively.
In addition, the function provides the "observable" data based on the dataset of the counterfactuals, i.e., the S and T endpoints given the treatment that was allocated to a patient.
The user can specify the assumption regarding monotonicity that should be made to generate the data (no monotonicity, monotonicity for S alone, monotonicity for T alone, or monotonicity for both S and T).
Sim.Data.STSBinBin(Monotonicity=c("No"), N.Total=2000, Seed)
Monotonicity |
The assumption regarding monotonicity that should be made when the data are generated, i.e., |
N.Total |
The desired number of patients in the simulated dataset. Default |
Seed |
A seed that is used to generate the dataset. Default |
The generated objects Data.STSBinBin_Counterfactuals (which contains the counterfactuals) and Data.STSBinBin_Obs (which contains the observable data) of class data.frame are placed in the workspace. Other relevant output can be accessed based on the fitted object (see Value below)
An object of class Sim.Data.STSBinBin with components,
Data.STSBinBin.Obs |
The generated dataset that contains the "observed" surrogate endrpoint, true endpoint, and assigned treatment. |
Data.STSBinBin.Counter |
The generated dataset that contains the counterfactuals. |
Vector_Pi |
The vector of probabilities of the potential outcomes, i.e., |
Pi_Marginals |
The vector of marginal probabilities |
True.R2_H |
The true |
True.Theta_T |
The true odds ratio for |
True.Theta_S |
The true odds ratio for |
Wim Van der Elst, Ariel Alonso, & Geert Molenberghs
## Generate a dataset with 2000 patients,
## assuming no monotonicity:
Sim.Data.STSBinBin(Monotonicity=c("No"), N.Total=200)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.