elra_matrix: Create matrix components for cumulative effects

make_time_matR Documentation

Create matrix components for cumulative effects

Description

These functions are called internally by get_cumulative and should usually not be called directly.

Usage

make_time_mat(data, nz)

make_latency_mat(data, tz)

make_lag_lead_mat(data, tz, ll_fun = function(t, tz) t >= tz)

make_z_mat(data, z_var, nz, ...)

Arguments

data

A data set (or similar) from which meta information on cut-points, interval-specific time, covariates etc. can be obtained.

z_var

Which should be transformed into functional covariate format suitable to fit cumulative effects in mgcv::gam.


pammtools documentation built on July 26, 2023, 6:07 p.m.