simrem: Simulate zero-truncated recurrent events data

Description Usage Arguments Value

Description

simrem simulates zero-truncated events data and returns a 3D-array

Usage

1
2
3
simrem(N = 5000, time = 365, b0 = -7, bpers = NULL, bage = NULL,
  cyc = F, alpha = NULL, theta = NULL, period = time, int = F,
  aint = NULL, tint = NULL, ...)

Arguments

N

the total (non-truncated) population size

time

the observation window

b0

the intercept, default value is -7

bpers

coefficients for time-invariant covariates. The data is simulated as ~ B(0.5)

bage

coefficients for time-varying dummy variables.

cyc

logical, whether cyclical predictors are added to the data. Default is FALSE

alpha

the amplitude of the cyclical effect. Only used when cyc is TRUE

theta

the phase of the cyclical effect. Only used when cyc is TRUE

period

the period of the cyclical effect, defaults to time

int

specify whether an interaction between the cyclical effect and the first variable of bpers should be included

aint

the amplitude of the cyclical interaction effect

tint

the phase of the cyclical interaction effect

...

Further arguments to be passed from or to other methods

Value

a 3D-array of dimensions n x time x variables. Note that n will vary over each simulation due to sampling fluctuation by drawing from the total population N


thomashusken/trem documentation built on May 31, 2019, 10:47 a.m.