Method for creating simulated data for HDLM & HDLMM
sim.hdlmm(
sim = "A",
n = 1000,
error = 1,
effect.size = 1,
exposure.data = NULL
)Simulated data and true parameters
character (A - E) specifying simulation scenario
sample size
positive scalar specifying error variance for Gaussian response
the effect size of the window of susceptibility
exposure data. A matrix of exposure data for simulation A, B, C and a named list of exposure data for simulation D, E
sim.hdlmm
Simulation scenarios:
Scenario A: Two subgroups with early/late windows determined by continuous and binary modifiers
Scenario B: Two subgroups with scaled effect determined by a continuous modifier
Scenario C: No heterogeneity i.e., same effect on all individuals
Scenario D: Three subgroups with three corresponding exposures. Subgroups are determined by continuous and binary modifiers
Scenario E: Two subgroups with two exposures. First group is associated with the scaled main effect and lagged interaction while the second group is only associated with the scaled main effect, no interaction.
sim.hdlmm(sim = "A", n = 1000)
Run the code above in your browser using DataLab