Skip to contents

The function generates Monte Carlo method confidence intervals for the mediation model \(Y \to M \to X\) (Standardized).

Usage

MCStdYMX(theta_hat, delta_t = 1:30, R = 20000L, seed = NULL)

Arguments

theta_hat

R object. Output of the ThetaHat() function.

delta_t

Numeric vector. Vector of time intervals.

R

Positive integer. Number of Monte Carlo replications.

seed

Integer. Random seed.

Examples

if (FALSE) { # \dontrun{
set.seed(42)
library(dynr)
sim <- GenData(taskid = 1)
data <- RandomMeasurement(sim)
fit <- FitDynr(data, taskid = 1)
theta_hat <- ThetaHat(fit)
ci <- MCStdYMX(phi_hat, seed = 42)
plot(ci)
} # }