simbinary | R Documentation |
This function generates a dataframe with 6 patient covariates and a binary outcome simulated from a model that uses the covariates.
simbinary(Npat = 100)
Npat |
Number of patients to simulate. |
The function returns a dataframe with:
x1, x2, x3, x4, x5, x6= patient covariates.
t= treatment assignment (0 for control, 1 for active).
logit.control= the logit of the probability of an outcome in the control treatment.
logit.active= the logit of the probability of an outcome in the active treatment.
benefit= treatment benefit in log odds ratio.
py=the probability of the outcome for each patient, under the treatment actually administered.
logit.py= the logit of py.
y.observed= the observed outcome
dat1=simbinary(100)$dat head(dat1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.