set.seed(42)
phi <- matrix(
data = c(
-0.357, 0.771, -0.450,
0.0, -0.511, 0.729,
0, 0, -0.693
),
nrow = 3
)
colnames(phi) <- rownames(phi) <- c("x", "m", "y")
MCPhi(
phi = phi,
vcov_phi_vec = 0.1 * diag(9),
R = 100L # use a large value for R in actual research
)
phi <- matrix(
data = c(
-6, 5.5, 0, 0,
1.25, -2.5, 5.9, -7.3,
0, 0, -6, 2.5,
5, 0, 0, -6
),
nrow = 4
)
colnames(phi) <- rownames(phi) <- paste0("y", 1:4)
MCPhi(
phi = phi,
vcov_phi_vec = 0.1 * diag(16),
R = 100L, # use a large value for R in actual research
test_phi = FALSE
)
Run the code above in your browser using DataLab