Creates information of a Bernoulli distributed covariate with the specified probability. This function call must be added to the md.simparams object.
md.simparams
md.binom(name, prob = 0.5)
name of the covariate
probability of success (having a value of 1)
# NOT RUN { # } # NOT RUN { library(missDeaths) sim = md.simparams() + md.binom("X", 0.25) # } # NOT RUN { # }
Run the code above in your browser using DataLab