tests/testthat/test-ptable_pop_pop_es.R

library(testthat)
suppressMessages(library(lavaan))

test_that("ptable_pop: Wrong pop_es", {

# Simple mediation model

mod <-
"
m ~ x
y ~ m + x
"

pop_es <- c("m ~ x2" = "m",
            "y ~ m" = "s",
            "y ~ x" = "s")

expect_warning(ptable_pop(model = mod,
                          pop_es = pop_es))
})

Try the power4mome package in your browser

Any scripts or data that you put into this service are public.

power4mome documentation built on Sept. 9, 2025, 5:35 p.m.