md.sex | R Documentation |
Creates information of a sex covariate that is a special case of Bernoulli covariate
specifying 1 for male and 2 for female sex.
This function call must be added to the md.simparams
object.
md.sex(name, maleperc = 0.5, asfactor = FALSE)
name |
name of the covariate |
maleperc |
percentage of males (value = 1) versus females (value = 2) |
asfactor |
specifies whether the resulting sex covariate is factorized using as.factor or not |
## Not run:
library(missDeaths)
sim = md.simparams() +
md.sex("sex", 0.5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.