as_fped: Transform data with one row per subject to functional PED...

Description Usage Arguments Value See Also

Description

Transform data with one row per subject to functional PED format

Usage

1
2
3
as_fped(formula, data, data_orig, cut = NULL, ..., max.end = FALSE,
  ll_fun = function(te, t) {     te <= t }, keep = c("id", "tstart",
  "eta_base", "eta_wce", "eta"))

Arguments

formula

a model formula

data

a data frame

cut

the vector of timepoints to cut at

...

Further arguments passed to survSplit

max.end

logical. Should the last interval span until the last observed censoring or event time (if larger than the largest specified cut point).

ll_fun

Function with two arguments that indicates how lag-lead matrix should be contructed. First argument is the time on the scale of the exposure, second argument is the time on the scale of the follow-up. Internally the lag lead matrix will be constructed by calling t(outer(te_vec, t_vec, ll_fun)).

Value

A data frame class ped in piece-wise exponential data format.

See Also

survSplit


adibender/pamm documentation built on May 14, 2019, 5:22 p.m.