structure_data: Structure recurrent events data to 3d format

Description Usage Arguments Value

Description

structure_data restructures a wide-format matrix or data frame to a 3d array, which can be passed on to fitrem to fit a model

Usage

1
structure_data(data, dcols, xcolnames, otime, ...)

Arguments

data

a wide-format matrix or data frame

dcols

column names containing capture dates

xcolnames

column names containing time-invariant covariates

otime

the observation window in days

...

Further arguments to be passed from or to other methods

Value

a 3D-array of dimension n x otime x length(xcolnames)


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