sim.hdlmm | R Documentation |
Method for creating simulated data for HDLM & HDLMM
sim.hdlmm(
sim = "A",
n = 1000,
error = 1,
effect.size = 1,
exposure.data = NULL
)
sim |
character (A - E) specifying simulation scenario |
n |
sample size |
error |
positive scalar specifying error variance for Gaussian response |
effect.size |
the effect size of the window of susceptibility |
exposure.data |
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.
Simulated data and true parameters
sim.hdlmm(sim = "A", n = 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.