From 46106b23fced27eefa06938f8060ba2fd5f73347 Mon Sep 17 00:00:00 2001 From: Julian Sagebiel <julian.sagebiel@idiv.de> Date: Thu, 26 Dec 2024 15:05:56 +0100 Subject: [PATCH] small fix make order of truecoef in summaryall correct --- R/sim_all.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/R/sim_all.R b/R/sim_all.R index 16d9e48..9893ba2 100644 --- a/R/sim_all.R +++ b/R/sim_all.R @@ -165,13 +165,13 @@ sim_all <- function(nosim = 2, - - - summaryall <- data.frame(truepar = as.double(c(bcoeff, rep( - NA, length(bcoeff) - ))), as.data.frame(purrr::map(all_designs, ~ .x$summary))) %>% + summaryall <- as.data.frame(purrr::map(all_designs, ~ .x$summary)) %>% dplyr::select(!dplyr::ends_with("vars")) %>% - dplyr::relocate(truepar, dplyr::ends_with(c( + tibble::rownames_to_column("parname") %>% + dplyr::mutate(parname = stringr::str_remove(parname, "^est_")) %>% + dplyr::left_join(data.frame(truepar = unlist(bcoeff)) %>% tibble::rownames_to_column("parname"), + by="parname") %>% + dplyr::relocate(parname, dplyr::ends_with(c( ".n", "truepar", "mean", "sd", "min" , "max", "range" , "se" ))) -- GitLab