simpoisson: Simulate data for poisson regression

View source: R/simpoisson.R

simpoissonR Documentation

Simulate data for poisson regression

Description

Simulate from piecewise constant exponential regression model with two binary variables X, Z whose distributions and effects may vary in time intervals.

Usage

simpoisson(
  N,
  changepoints,
  baseline,
  beta,
  gamma,
  delta = 0,
  comprisk,
  alpha,
  zeta,
  px,
  pz,
  pv = NULL,
  pxz = 0,
  const = "none"
)

Arguments

N

sample size.

changepoints

borders of time intervals.

baseline

baseline rate in intervals.

beta

effect of X (log hazard ratio).

gamma

effect of Z (log hazard ratio).

delta

effect of V (log hazard ratio).

comprisk

rate of competing risk event.

alpha

effect of X on competing risk (log hazard ratio).

zeta

effect of Z on competing risk (log hazard ratio).

px

probability of X in intervals.

pz

probability of Z in intervals.

pv

probability vector for categories of V.

pxz

effect of Z on X (log odds ratio).

const

Whether the distributions of X and Z vary over time is controlled with argument ‘const’. const="XZ" means that both X and Z do not change over time. const="X" means that only X does not change over time. const="Z" means that only Z does not change over time.

Author(s)

Thomas A. Gerds <tag@biostat.ku.dk>


tagteam/heaven documentation built on Oct. 24, 2024, 7:40 p.m.