sim.hdlmm: Creates simulated data for HDLM & HDLMM

View source: R/sim.hdlmm.R

sim.hdlmmR Documentation

Creates simulated data for HDLM & HDLMM

Description

Method for creating simulated data for HDLM & HDLMM

Usage

sim.hdlmm(
  sim = "A",
  n = 1000,
  error = 1,
  effect.size = 1,
  exposure.data = NULL
)

Arguments

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

Details

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.

Value

Simulated data and true parameters

Examples

sim.hdlmm(sim = "A", n = 1000)


dlmtree documentation built on June 22, 2024, 10:05 a.m.