Skip to content

Commit

Permalink
fix #41 ensure collinearity data is properly subset
Browse files Browse the repository at this point in the history
- update roxygen
- devtools::document()
- rebuild pkg
  • Loading branch information
egouldo committed Jun 14, 2024
1 parent f242965 commit 65d4fd2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,13 @@ export(summarise_variable_counts)
export(validate_predictions)
export(validate_predictions_df_blue_tit)
export(validate_predictions_df_euc)
import(cli)
import(dplyr)
import(ggbeeswarm)
import(ggplot2)
import(metafor)
import(purrr)
import(rlang)
import(see)
importFrom(EnvStats,stat_n_text)
importFrom(broom,tidy)
Expand Down
8 changes: 6 additions & 2 deletions R/meta_analyse_datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
#'
#' @return A nested dataframe with all columns of object parsed to arg `MA_data`, but with additional columns for the results of each analysis: `MA_mod`, `sorensen_glm`, `box_cox_ratings_cont`, `box_cox_ratings_cat`, `box_cox_rating_cat_no_int`, `uni_mixed_effects`
#' @export
#' @import purrr
#' @import dplyr
#' @import cli
#' @import rlang
#' @family Multi-dataset Wrapper Functions
#'
#' @examples
Expand All @@ -34,7 +38,7 @@ meta_analyse_datasets <- function(MA_data){
fit_MA_mv <- function(effects_analysis, Z_colname, VZ_colname, estimate_type){
Zr <- effects_analysis %>% pull({{Z_colname}})
VZr <- effects_analysis %>% pull({{VZ_colname}})
mod <- fit_metafor_mv(estimate = Zr,
mod <- poss_fit_metafor_mv(estimate = Zr,
variance = VZr,
estimate_type = estimate_type,
data = effects_analysis)
Expand All @@ -45,7 +49,7 @@ meta_analyse_datasets <- function(MA_data){
# Must group by cols else multiple "effects_analysis" elements
# get passed to fit_MA_mv()
MA_data <- MA_data %>%
group_by(estimate_type, dataset, exclusion_set, publishable_subset, expertise_subset)
group_by(estimate_type, dataset, exclusion_set, publishable_subset, expertise_subset, collinearity_subset)
} else {
MA_data <- MA_data %>%
group_by(estimate_type, dataset, exclusion_set)
Expand Down

1 comment on commit 65d4fd2

@egouldo
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incorrect issue reference, should be #40

Please sign in to comment.