betaselectr
Betas-Select in Structural Equation Models and Linear Models
v0.1.3
·
Oct 28, 2025
·
GPL (>= 3)
Description
It computes betas-select, coefficients after standardization in structural equation models and regression models, standardizing only selected variables. Supports models with moderation, with product terms formed after standardization. It also offers confidence intervals that account for standardization, including bootstrap confidence intervals as proposed by Cheung et al. (2022) <doi:10.1037/hea0001188>.
Downloads
224
Last 30 days
14254th
391
Last 90 days
391
Last year
Trend: +34.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 | ERROR |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | OK |
| 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 (14 non-OK)
OK
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
*
ERROR
r-devel-macos-arm64
tests
Running ‘testthat.R’ [4s/2s]
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(betaselectr)
>
> test_check("betaselectr")
Starting 2 test processes.
> test-lav_betaselect.R: This is lavaan 0.6-21
> test-lav_betaselect.R: lavaan is FREE software! Please report any bugs.
> test-lav_betaselect_check.R: This is lavaan 0.6-21
> test-lav_betaselect_check.R: lavaan is FREE software! Please report any bugs.
> test-lav_betaselect_user_2.R:
> test-lav_betaselect_user_2.R: *** caught segfault ***
> test-lav_betaselect_user_2.R: address 0x1, cause 'invalid permissions'
> test-lav_betaselect_user_2.R:
> test-lav_betaselect_user_2.R: Traceback:
> test-lav_betaselect_user_2.R: 1: eigen(S, symmetric = TRUE)
> test-lav_betaselect_user_2.R: 2: lav_matrix_symmetric_inverse(S = Sigma, logdet = TRUE, Sinv.method = Sinv.method)
> test-lav_betaselect_user_2.R: 3: lav_mvnorm_loglik_samplestats(sample.mean = lavsamplestats@mean[[g]], sample.cov = lavsamplestats@cov[[g]], sample.nobs = lavsamplestats@nobs[[g]], Mu = Mu, Sigma = lavimplied$cov[[g]], x.idx = lavsamplestats@x.idx[[g]], x.mean = lavsamplestats@mean.x[[g]], x.cov = lavsamplestats@cov.x[[g]], Sinv.method = "eigen", Sigma.inv = NULL)
> test-lav_betaselect_user_2.R: 4: lav_model_loglik(lavdata = lavdata, lavsamplestats = lavsamplestats, lavh1 = lavh1, lavimplied = lavimplied, lavmodel = lavmodel, lavoptions = lavoptions)
> test-lav_betaselect_user_2.R: 5: lav_lavaan_step12_loglik(lavoptions = lavoptions, lavdata = lavdata, lavsamplestats = lavsamplestats, lavh1 = lavh1, lavimplied = lavimplied, lavmodel = lavmodel)
> test-lav_betaselect_user_2.R: 6: lavaan::lavaan(slotOptions = slot_opt1, slotParTable = slot_pat1, slotModel = slot_mod1, slotSampleStats = slot_smp, slotData = slot_dat)
> test-lav_betaselect_user_2.R: 7: func(x * (0 + (0+1i)), ...)
> test-lav_betaselect_user_2.R: 8: doTryCatch(return(expr), name, parentenv, handler)
> test-lav_betaselect_user_2.R: 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
> test-lav_betaselect_user_2.R: 10: tryCatchList(expr, classes, parentenv, handlers)
> test-lav_betaselect_user_2.R: 11: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
> test-lav_betaselect_user_2.R: 12: try(func(x * (0 + (0+1i)), ...), silent = TRUE)
> test-lav_betaselect_user_2.R: 13: lavaan::lav_func_jacobian_complex(func = std_fct_v, x = fit_est)
> test-lav_betaselect_user_2.R: 14: std_se_delta_all(std_fct = std_fct, std_fct_v = std_fct_v, fit_est = fit_est, fit_vcov = fit_vcov, method = delta_method, progress = progress)
> test-lav_betaselect_user_2.R: 15: lav_betaselect(fit, standardized = TRUE, not_to_standardize = "x3", std_se = "delta", ci = TRUE, progress = FALSE)
> test-lav_betaselect_user_2.R: 16: system.time(out_noy <- lav_betaselect(fit, standardized = TRUE, not_to_standardize = "x3", std_se = "delta", ci = TRUE, progress = FALSE))
> test-lav_betaselect_user_2.R: 17: eval(code, test_env)
> test-lav_betaselect_user_2.R: 18: eval(code, test_env)
> test-lav_betaselect_user_2.R: 19: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
> test-lav_betaselect_user_2.R: 20: doTryCatch(return(expr), name, parentenv, handler)
> test-lav_betaselect_user_2.R: 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
> test-lav_betaselect_user_2.R: 22: tryCatchList(expr, classes, parentenv, handlers)
> test-lav_betaselect_user_2.R: 23: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) {
> test-lav_betaselect_user_2.R: snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
> test-lav_betaselect_user_2.R: 24: doWithOneRestart(return(expr), restart)
> test-lav_betaselect_user_2.R: 25: withOneRestart(expr, restarts[[1L]])
> test-lav_betaselect_user_2.R: 26: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
> test-lav_betaselect_user_2.R: 27: test_code(code, parent.frame())
> test-lav_betaselect_user_2.R: 28: test_that("User parameters", { system.time(out_noy <- lav_betaselect(fit, standardized = TRUE, not_to_standardize = "x3", std_se = "delta", ci = TRUE, progress = FALSE)) ind <- indirect_effect(x = "x1", y = "x3", m = "x2", fit = fit, standardized_x = TRUE) expect_equal(out_noy$std.p[6], coef(ind), ignore_attr = TRUE)})
> test-lav_betaselect_user_2.R: 29: eval(code, test_env)
> test-lav_betaselect_user_2.R: 30: eval(code, test_env)
> test-lav_betaselect_user_2.R: 31: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
> test-lav_betaselect_user_2.R: 32: doTryCatch(return(expr), name, parentenv, handler)
> test-lav_betaselect_user_2.R: 33: tryCatchOne(expr, names, parentenv, handlers[[1L]])
> test-lav_betaselect_user_2.R: 34: tryCatchList(expr, classes, parentenv, handlers)
> test-lav_betaselect_user_2.R: 35: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
> test-lav_betaselect_user_2.R: 36: doWithOneRestart(return(expr), restart)
> test-lav_betaselect_user_2.R: 37: withOneRestart(expr, restarts[[1L]])
> test-lav_betaselect_user_2.R: 38: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
> test-lav_betaselect_user_2.R: 39: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
> test-lav_betaselect_user_2.R: 40: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
> test-lav_betaselect_user_2.R: 41: test_one_file(path, env = the$testing_env, shuffle = shuffle)
> test-lav_betaselect_user_2.R: 42: doTryCatch(return(expr), name, parentenv, handler)
> test-lav_betaselect_user_2.R: 43: tryCatchOne(expr, names, parentenv, handlers[[1L]])
> test-lav_betaselect_user_2.R: 44: tryCatchList(expr, classes, parentenv, handlers)
> test-lav_betaselect_user_2.R: 45: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
> test-lav_betaselect_user_2.R: 46: with_reporter(multi, test_one_file(path, env = the$testing_env, shuffle = shuffle))
> test-lav_betaselect_user_2.R: 47: asNamespace("testthat")$queue_task(path, shuffle)
> test-lav_betaselect_user_2.R: 48: (function (path, shuffle) { asNamespace("testthat")$queue_task(path, shuffle)})(base::quote("test-lav_betaselect_user_2.R"), base::quote(FALSE))
> test-lav_betaselect_user_2.R: 49: (function (what, args, quote = FALSE, envir = parent.frame()) { if (!is.list(args)) stop("second argument must be a list") if (quote) args <- lapply(args, enquote) .Internal(do.call(what, args, envir))})(base::quote(function (path, shuffle) { asNamespace("testthat")$queue_task(path, shuffle)}), base::quote(list("test-lav_betaselect_user_2.R", FALSE)), envir = base::quote(<environment>), quote = base::quote(TRUE))
> test-lav_betaselect_user_2.R: 50: base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpLQIavd/callr-fun-46465ebdad0d"), base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE)
> test-lav_betaselect_user_2.R: 51: base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpLQIavd/callr-fun-46465ebdad0d"), base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = "/Volumes/Temp/tmp/RtmpLQIavd/callr-rs-result-464676ac6112", compress = FALSE)
> test-lav_betaselect_user_2.R: 52: base::withCallingHandlers({ { NULL NULL } base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpLQIavd/callr-fun-46465ebdad0d"), base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = "/Volumes/Temp/tmp/RtmpLQIavd/callr-rs-result-464676ac6112", compress = FALSE) base::flush(base::stdout()) base::flush(base::stderr()) { NULL NULL } base::invisible()}, error = function(e) { { callr_data <- base::as.environment("tools:callr")$`__callr_data__` err <- callr_data$err if (FALSE) { base::assign(".Traceback", base::.traceback(4), envir = callr_data) utils::dump.frames("__callr_dump__") base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`, envir = callr_data) base::rm("__callr_dump__", envir = .GlobalEnv) } e <- err$process_call(e) e2 <- err$new_error("error in callr subprocess") class <- base::class class(e2) <- base::c("callr_remote_error", class(e2)) e2 <- err$add_trace_back(e2) cut <- base::which(e2$trace$scope == "global")[1] if (!base::is.na(cut)) { e2$trace <- e2$trace[-(1:cut), ] } base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpLQIavd/callr-rs-result-464676ac6112", ".error")) }}, interrupt = function(e) { { callr_data <- base::as.environment("tools:callr")$`__callr_data__` err <- callr_data$err if (FALSE) { base::assign(".Traceback", base::.traceback(4), envir = callr_data) utils::dump.frames("__callr_dump__") base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`, envir = callr_data) base::rm("__callr_dump__", envir = .GlobalEnv) } e <- err$process_call(e) e2 <- err$new_error("error in callr subprocess") class <- base::class class(e2) <- base::c("callr_remote_error", class(e2)) e2 <- err$add_trace_back(e2) cut <- base::which(e2$trace$scope == "global")[1] if (!base::is.na(cut)) { e2$trace <- e2$trace[-(1:cut), ] } base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpLQIavd/callr-rs-result-464676ac6112", ".error")) }}, callr_message = function(e) { base::try({ pxlib <- base::as.environment("tools:callr")$`__callr_data__`$pxlib if (base::is.null(e$code)) e$code <- "301"
> test-lav_betaselect_user_2.R: msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e, NULL))) data <- base::paste0(e$code, " ", base::nchar(msg), "\n", msg) pxlib$write_fd(3L, data) if (base::inherits(e, "cli_message") && !base::is.null(base::findRestart("cli_message_handled"))) { base::invokeRestart("cli_message_handled") } else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) { base::invokeRestart("muffleMessage") } })})
> test-lav_betaselect_user_2.R: 53: doTryCatch(return(expr), name, parentenv, handler)
> test-lav_betaselect_user_2.R: 54: tryCatchOne(expr, names, parentenv, handlers[[1L]])
> test-lav_betaselect_user_2.R: 55: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
> test-lav_betaselect_user_2.R: 56: doTryCatch(return(expr), name, parentenv, handler)
> test-lav_betaselect_user_2.R: 57: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]])
> test-lav_betaselect_user_2.R: 58: tryCatchList(expr, classes, parentenv, handlers)
> test-lav_betaselect_user_2.R: 59: base::tryCatch(base::withCallingHandlers({ { NULL NULL } base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpLQIavd/callr-fun-46465ebdad0d"), base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, quote = TRUE), file = "/Volumes/Temp/tmp/RtmpLQIavd/callr-rs-result-464676ac6112", compress = FALSE) base::flush(base::stdout()) base::flush(base::stderr()) { NULL NULL } base::invisible()}, error = function(e) { { callr_data <- base::as.environment("tools:callr")$`__callr_data__` err <- callr_data$err if (FALSE) { base::assign(".Traceback", base::.traceback(4), envir = callr_data) utils::dump.frames("__callr_dump__") base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`, envir = callr_data) base::rm("__callr_dump__", envir = .GlobalEnv) } e <- err$process_call(e) e2 <- err$new_error("error in callr subprocess") class <- base::class class(e2) <- base::c("callr_remote_error", class(e2)) e2 <- err$add_trace_back(e2) cut <- base::which(e2$trace$scope == "global")[1] if (!base::is.na(cut)) { e2$trace <- e2$trace[-(1:cut), ] } base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpLQIavd/callr-rs-result-464676ac6112", ".error")) }}, interrupt = function(e) { { callr_data <- base::as.environment("tools:callr")$`__callr_data__` err <- callr_data$err if (FALSE) { base::assign(".Traceback", base::.traceback(4), envir = callr_data) utils::dump.frames("__callr_dump__") base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`, envir = callr_data) base::rm("__callr_dump__", envir = .GlobalEnv) } e <- err$process_call(e) e2 <- err$new_error("error in callr subprocess") class <- base::class class(e2) <- base::c("callr_remote_error", class(e2)) e2 <- err$add_trace_back(e2) cut <- base::which(e2$trace$scope == "global")[1] if (!base::is.na(cut)) { e2$trace <- e2$trace[-(1:cut), ] } base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpLQIavd/callr-rs-result-464676ac6112", ".error")) }}, callr_message = function(e) { base::try({ pxlib <- base::as.environment("tools:callr")$`__callr_data__`$pxlib if (base::is.null(e$code)) e$code <- "301" msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e, NULL))) data <- base::paste0(e$code, " ", base::nchar(msg), "\n", msg) pxlib$write_fd(3L, data) if (base::inherits(e, "cli_message") && !base::is.null(base::findRestart("cli_message_handled"))) { base::invokeRestart("cli_message_handled") } else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) { base::invokeRestart("muffleMessage") } })}), error = function(e) { { NULL NULL } if (FALSE) { base::try(base::stop(e)) } else { base::invisible() }}, interrupt = function(e) { { NULL NULL } if (FALSE) { e } else { base::invisible() }})
> test-lav_betaselect_user_2.R: An irrecoverable exception occurred. R is aborting now ...
Error:
! testthat subprocess exited in file 'test-lav_betaselect_user_2.R'.
Caused by error:
! R session crashed with exit code -11
Backtrace:
▆
1. └─testthat::test_check("betaselectr")
2. └─testthat::test_dir(...)
3. └─testthat:::test_files(...)
4. └─testthat:::test_files_parallel(...)
5. ├─withr::with_dir(...)
6. │ └─base::force(code)
7. ├─testthat::with_reporter(...)
8. │ └─base::tryCatch(...)
9. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
10. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
11. │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
12. └─testthat:::parallel_event_loop_chunky(queue, reporters, ".")
13. └─queue$poll(Inf)
14. └─base::lapply(...)
15. └─testthat (local) FUN(X[[i]], ...)
16. └─private$handle_error(msg, i)
17. └─cli::cli_abort(...)
18. └─rlang::abort(...)
Execution halted
OK
r-devel-windows-x86_64
*
OK
r-oldrel-macos-arm64
*
OK
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
*
Check History
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 9, 2026
ERROR
r-devel-macos-arm64
tests
Running ‘testthat.R’ [4s/2s] 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(be
Dependency Network
Version History
new
0.1.3
Mar 10, 2026