Hadoop Online Training by Edureka

Sim.Data.STSBinBin: Simulates a dataset that can be used to assess surrogacy in...

Description Usage Arguments Details Value Author(s) Examples


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)



The assumption regarding monotonicity that should be made when the data are generated, i.e., Monotonicity="No" (no monotonicity assumed), Monotonicity="True.Endp" (monotonicity assumed for the true endpoint alone), Monotonicity="Surr.Endp" (monotonicity assumed for the surrogate endpoint alone), and Monotonicity="Surr.True.Endp" (monotonicity assumed for both endpoints). Default Monotonicity="No".


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.


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,


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 π_{1 \cdot 1 \cdot}, π_{0 \cdot 1 \cdot}, π_{1 \cdot 0 \cdot}, π_{0 \cdot 0 \cdot}, π_{\cdot 1 \cdot 1}, π_{\cdot 1 \cdot 0}, π_{\cdot 0 \cdot 1}, π_{\cdot 0 \cdot 0}.


The true R_H^2 value.


The true odds ratio for T.


The true odds ratio for S.


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)

Search within the Surrogate package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.