1 Matching Annotations
  1. Sep 2025
    1. stats.table <- tidy(cor_results) stats.table %>% dplyr::mutate( estimate = round(estimate, 2), statistic = round(statistic, 2), ic_95 = paste0("[", round(conf.low, 2), ",", round(conf.high, 2), "]"), stars = gtools::stars.pval(p.value), p_value = case_when( p.value < 0.05 & p.value > 0.01 ~ "< 0.05", p.value < 0.01 & p.value > 0.001 ~ "< 0.01", p.value < 0.001 ~ "< 0.001", TRUE ~ "" ), p_value = paste0(p_value, stars) ) %>% dplyr::select(estimate, statistic, p_value, parameter, method, alternative, ic_95) %>% kableExtra::kable( col.names = c("Estimación", "t", "p-value", "df", "Método", "Alternativa", "95% IC"), booktabs = T ) %>% kableExtra::kable_styling( bootstrap_options = c("striped", "hover", "condensed", "responsive"), full_width = T, latex_options = "hold_position", position = "center" )

      Para que corra este código es necesario el paquete gtools, porque sino sale error, sugiero agregar la instalación del paquete antes de esto o al inicio.