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))
An object of class Sim.Data.CounterfactualsBinBin
with components,
The generated dataset that contains the "observed" surrogate endrpoint, true endpoint, and assigned treatment.
The generated dataset that contains the counterfactuals.
The vector of probabilities of the potential outcomes, i.e., \(pi_{0000}\), \(pi_{0100}\), \(pi_{0010}\), \(pi_{0001}\), \(pi_{0101}\), \(pi_{1000}\), \(pi_{1010}\), \(pi_{1001}\), \(pi_{1110}\), \(pi_{1101}\), \(pi_{1011}\), \(pi_{1111}\), \(pi_{0110}\), \(pi_{0011}\), \(pi_{0111}\), \(pi_{1100}\).
The vector of marginal probabilities \(\pi_{1 \cdot 1 \cdot}\), \(\pi_{0 \cdot 1 \cdot}\), \(\pi_{1 \cdot 0 \cdot}\), \(\pi_{0 \cdot 0 \cdot}\), \(\pi_{\cdot 1 \cdot 1}\), \(\pi_{\cdot 1 \cdot 0}\), \(\pi_{\cdot 0 \cdot 1}\), \(\pi_{\cdot 0 \cdot 0}\).
The true \(R_H^2\) value.
The true odds ratio for \(T\).
The true odds ratio for \(S\).
The vector of probabilities of the potential outcomes, i.e., \(pi_{0000}\), \(pi_{0100}\), \(pi_{0010}\), \(pi_{0001}\), \(pi_{0101}\), \(pi_{1000}\), \(pi_{1010}\), \(pi_{1001}\), \(pi_{1110}\), \(pi_{1101}\), \(pi_{1011}\), \(pi_{1111}\), \(pi_{0110}\), \(pi_{0011}\), \(pi_{0111}\), \(pi_{1100}\). Default rep(1/16, 16)
.
The desired number of patients in the simulated dataset. Default \(2000\).
A seed that is used to generate the dataset. Default sample(x=1:1000, size=1)
, i.e., a random number between 1 and 1000.
Wim Van der Elst, Ariel Alonso, & Geert Molenberghs
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.
## Generate a dataset with 2000 patients, and values 1/16
## for all proabilities between the counterfactuals:
Sim.Data.CounterfactualsBinBin(N.Total=2000)
Run the code above in your browser using DataLab