Skip to content

Commit

Permalink
#88 add process_response()
Browse files Browse the repository at this point in the history
- for alternate to standardise_response()
  • Loading branch information
egouldo committed Aug 14, 2024
1 parent 41e29af commit e07d131
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions R/standardise_response.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,26 @@ standardise_response <- function(dat,
# TODO for any analyses implicitly excluded, return a message to the user
return(dat)
}

#' Process response data for meta-analysis
#'
#' @description
#' This function generates the response data for meta-analysis without standardising the effect sizes / out-of-sample predictions.
#' @describeIn process_analyst_data Process response data for meta-analysis but do not standardise effect-sizes
process_response <- function(dat,
estimate_type = NULL,
param_table = NULL,
dataset = NULL){ #TODO what to do about args in pmap_prepare_response? allow ... args in fns(x,y,z, ...)?

Z_names_lookup <- c(Z = "estimate", #blue tit
Z = "fit", #eucalyptus
VZ = "se.fit") # both datasets

dat %>%
mutate(back_transformed_data =
map(back_transformed_data,
rename,
any_of(Z_names_lookup)),
params = NA)
#TODO replace dummy function with actual function
}

0 comments on commit e07d131

Please sign in to comment.