md.sex {missDeaths}R Documentation

md.sex

Description

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.

Usage

md.sex(name, maleperc = 0.5, asfactor = FALSE)

Arguments

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

Examples


## Not run: 
library(missDeaths)

sim = md.simparams() +
   md.sex("sex", 0.5)

## End(Not run)


[Package missDeaths version 2.7 Index]