Skip to contents

Process data

Usage

process_data(
  id,
  basec,
  expo,
  med,
  tvar,
  lag,
  outc,
  time,
  norev = NULL,
  tvar_to_med = FALSE,
  cont_exp = FALSE,
  cont_exp_std = FALSE,
  sp_list = NULL,
  sp_type = NULL,
  sp_df = NULL,
  data
)

Arguments

id

patient id

basec

time-fixed variables

expo

exposure variable

med

mediator variable

tvar

time-varying variable

lag

number of lag

outc

outcome variable

time

time variable

norev

non-reversible variable (among expo,med,tvar)

tvar_to_med

time-varying varible to mediator

cont_exp

continuous exposure

cont_exp_std

standardize the continuous exposure

sp_list

splines list

sp_type

splines type

sp_df

spines degree of freedom

data

input data

Value

a data frame with lag of exposure, mediator, time-varying variable