View source: R/SimDataCounterfactualsBinBin.R
Sim.Data.CounterfactualsBinBin | R Documentation |
The function Sim.Data.CounterfactualsBinBin
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. The user can specify the number of patients and the desired probabilities of the vector of potential outcomes (i.e., \bold{{Y'}_c}
=(T_0, T_1, S_0, S_1)).
Sim.Data.CounterfactualsBinBin(Pi_s=rep(1/16, 16),
N.Total=2000, Seed=sample(1:1000, size=1))
Pi_s |
The vector of probabilities of the potential outcomes, 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 object Data.STSBinBin.Counter
(which contains the counterfactuals) and Data.STSBinBin.Obs
(the "observable data") (of class data.frame
) is placed in the workspace.
An object of class Sim.Data.CounterfactualsBinBin
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, and values 1/16
## for all proabilities between the counterfactuals:
Sim.Data.CounterfactualsBinBin(N.Total=2000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.