missDeaths (version 2.7)

md.exp: md.exp

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

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

Run this code
# NOT RUN {
# }
# 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab