Skip to content

Commit

Permalink
update formula given from gee_test() to jackknife_se() so that ja…
Browse files Browse the repository at this point in the history
…ckknife standard errors correctly work when `gee_test()` is called by `enviromtx::fit_mgx_model()`
  • Loading branch information
svteichman committed Jun 6, 2024
1 parent 9016d74 commit 49975ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/gee_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ gee_test <- function(use_geeasy = TRUE, use_jack_se = FALSE, ...) {

# get jackknife standard errors if needed
if (use_jack_se) {
output[, 2] <- jackknife_se(object = gee_result,
gee_result_new <- gee_result
gee_result_new$call$formula <- eval(gee_result$call$formula, rlang::caller_env())
output[, 2] <- jackknife_se(object = gee_result_new,
dat = eval(cl$data, envir = rlang::caller_env())[the_reorder, ],
id = eval(cl$id, envir = rlang::caller_env())[the_reorder])
}
Expand Down

0 comments on commit 49975ae

Please sign in to comment.