md.sex: md.sex

Description Usage Arguments Examples

View source: R/library.R

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

1
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

1
2
3
4
5
6
7
## Not run: 
library(missDeaths)

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

## End(Not run)

missDeaths documentation built on Oct. 23, 2020, 6:39 p.m.