power4mome
Power Analysis for Moderation and Mediation
v0.2.1
·
Mar 23, 2026
·
GPL (>= 3)
Description
Power analysis and sample size determination for moderation, mediation, and moderated mediation in models fitted by structural equation modelling using the 'lavaan' package by Rosseel (2012) <doi:10.18637/jss.v048.i02> or by multiple regression. The package 'manymome' by Cheung and Cheung (2024) <doi:10.3758/s13428-023-02224-z> is used to specify the indirect paths or conditional indirect paths to be tested.
Downloads
12.9K
Last 30 days
1105th
13.2K
Last 90 days
14.3K
Last year
Trend: +6536.1% (30d vs prior 30d)
CRAN Check Status
1
ERROR
13
OK
Show all 14 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-macos-arm64 | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | ERROR |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (1 non-OK)
ERROR
r-oldrel-macos-arm64
tests
Running ‘testthat.R’ [125s/63s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(power4mome)
>
> test_check("power4mome")
Starting 2 test processes.
> test-power4test_mg.R:
> test-power4test_mg.R: Updating the simulation for sample size: 150
> test-power4test_mg.R: Re-simulate the data:
> test-power4test_mg.R: Fit the model(s):
> test-power4test_mg.R: Update the test(s):
> test-power4test_mg.R: Update test_parameters: CIs (pars: m~x,m~x.g2) :
> test-power4test_mg.R:
> test-power4test_mg.R: Updating the simulation for sample size: 200
> test-power4
...[truncated]...
r_n_merge_all_tests.R:1:1',
'test-x_from_power_for_n_more_than_one_rr.R:1:1',
'test-x_from_power_for_n_region_merge_all_tests.R:1:1',
'test-x_from_power_for_n_region_reject.R:1:1',
'test-x_from_power_for_n_short.R:1:1',
'test-x_from_power_for_n_short_close.R:1:1',
'test-x_from_power_for_n_short_close_power_curve_point.R:1:1',
'test-x_from_power_for_n_short_close_power_curve_ublb.R:1:1',
'test-x_from_power_for_n_short_n_region.R:1:1',
'test-x_from_power_for_n_short_reject.R:1:1',
'test-x_from_power_for_n_short_use_by_n.R:1:1',
'test-x_from_power_for_n_short_use_x_from.R:1:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-test_indirects.R:61:1'): indirect effects ────────────────────
Expected `chk[[1]]$sig[1]` to equal `chkb[[1]]$sig[1]`.
Differences:
`actual`: 0.00
`expected`: 0.20
[ FAIL 1 | WARN 0 | SKIP 76 | PASS 501 ]
Error:
! Test failures.
Execution halted
Check History
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 17, 2026
ERROR
r-oldrel-macos-arm64
tests
Running ‘testthat.R’ [112s/56s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional
...[truncated]...
:1'): indirect effects ────────────────────
Expected `chk[[1]]$sig[1]` to equal `chkb[[1]]$sig[1]`.
Differences:
`actual`: 0.00
`expected`: 0.20
[ FAIL 1 | WARN 0 | SKIP 76 | PASS 501 ]
Error:
! Test failures.
Execution halted