Skip to contents

The function generates parametric bootstrap method confidence intervals for the mediation model \(X \to M \to Y\).

Usage

BootParaXMY(boot, phi_hat, delta_t = 1:30, ncores = NULL)

Arguments

boot

R object. Output of the BootPara() function.

phi_hat

R object. Output of the PhiHat() function.

delta_t

Numeric vector. Vector of time intervals.

ncores

Positive integer. Number of cores to use.

Examples

if (FALSE) { # \dontrun{
set.seed(42)
library(dynr)
sim <- GenData(taskid = 1)
data <- RandomMeasurement(sim)
fit <- FitDynr(data, taskid = 1)
boot <- BootPara(
  fit = fit,
  path = getwd(),
  prefix = "pb",
  taskid = 1,
  B = 1000L
)
phi_hat <- PhiHat(fit)
ci <- BootParaXMY(boot = boot, phi_hat = phi_hat)
plot(ci)
plot(ci, type = "bc")
} # }