createDataDLAG: Simulate a data set with exposures measured over time such...

View source: R/createDataDLAG.R

createDataDLAGR Documentation

Simulate a data set with exposures measured over time such that there is an effect of exposure 1 and 2 as well as an interaction between them

Description

Simulate a data set with exposures measured over time such that there is an effect of exposure 1 and 2 as well as an interaction between them

Usage

createDataDLAG(
  n = 200,
  p = 5,
  t = 37,
  q = 5,
  corr_exposures = 0.5,
  corr_time = 0.95,
  betaMain = NULL,
  betaInt = NULL
)

Arguments

n

Sample size of the model

p

Number of exposures

q

Number of additional covariates

corr_exposures

Correlation between exposures at a point in time

corr_time

Correlation within exposures across time

betaInt

Optional list of true distributed lag surfaces for each interaction If left NULL, exposures 1 and 2 will have an interaction effect.

beta

Optional list of true distributed lag curves for each exposure. If left NULL, exposures 1 and 2 will have an effect on the outcome.


jantonelli111/BayesianDLAG documentation built on Jan. 30, 2023, 4:26 a.m.