md.exp: md.exp

Description Usage Arguments Examples

View source: R/library.R

Description

Creates information of an event time variable distributed according to the specified exponential distribution. This function call must be added to the md.simparams object.

Usage

1
md.exp(name, startcol, covariates, betas, lambda)

Arguments

name

name of the column

startcol

column name specifying individual study start dates or a start date

covariates

names of covariate columns used

betas

betas for the corresponding covariate columns

lambda

baseline lambda

Examples

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

sim = md.simparams() +
  md.uniform("X1", 0.5) + 
    md.norm("X2") +
      md.exp("event", as.Date("1915-1-1"), c("X1", "X2"), c(0.1, 0.2), 0.05/365.2425)

## End(Not run)

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