# Specify the model
mod <-
"
m ~ x
y ~ m + x
"
# Specify the population values
es <-
"
y ~ m: l
m ~ x: m
y ~ x: n
"
# Simulated datasets
sim_only <- power4test(nrep = 2,
model = mod,
pop_es = es,
n = 100,
do_the_test = FALSE,
iseed = 1234)
# Test the parameters in each dataset
test_out <- power4test(object = sim_only,
test_fun = test_parameters)
# Print the summary
summarize_tests(test_out)
Run the code above in your browser using DataLab