Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rm functions out of manuscript and into ManyEcoEvo pkg + pipeline #42

Open
egouldo opened this issue Jul 29, 2024 · 1 comment
Open
Assignees
Labels
feature a feature request or enhancement

Comments

@egouldo
Copy link
Owner

egouldo commented Jul 29, 2024

See issue egouldo/ManyEcoEvo#29

The following functions are to be moved to software pkg, checking for:

  • fn exists, or isn't renamed in ManyEcoEvo
    • if exists, arguments are the same order and name
    • if exists, delete in ManyAnalysts repository
  • fn does not exist in ManyEcoEvo:
    • move or copy function into ManyEcoEvo
    • write Roxygen2 documentation with help of GH co-pilot
    • Rebuild package
    • Can or should, application of function be moved to targets pipeline?
      • If so, move into targets pipeline,
        • source tar_make.R
        • Rebuild package
        • Update version number major.
      • If not, Ensure application in either ManyEcoEvo matches argument names, total number and position.
  • fit_MA_mv

ManyAnalysts/index.qmd

Lines 2923 to 2931 in 91ca56a

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 <- ManyEcoEvo::fit_metafor_mv(estimate = Zr,
variance = VZr,
estimate_type = estimate_type,
data = effects_analysis)
return(mod)
}

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 <- ManyEcoEvo::fit_metafor_mv(estimate = Zr,
variance = VZr,
estimate_type = estimate_type,
data = effects_analysis)
return(mod)
}

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 <- ManyEcoEvo::fit_metafor_mv(estimate = Zr,
variance = VZr,
estimate_type = estimate_type,
data = effects_analysis)
return(mod)
}
plot_forest <- function(data, intercept = TRUE, MA_mean = TRUE){
if(MA_mean == FALSE){
data <- filter(data, study_id != "overall")
}

  • plot_forest
  • plot_forest_2 (and what's the difference)?
  • consider adding create_model_workflow, could wish to leave in manuscript
  • possibly_check_convergence_glm
  • plot_model_means_RE
  • walk_plot_effects_diversity
  • logged Euc analysis

See egould/ManyEcoEvo/

@egouldo egouldo added this to the publication milestone Jul 29, 2024
@egouldo egouldo self-assigned this Jul 29, 2024
@egouldo
Copy link
Owner Author

egouldo commented Jul 29, 2024

fit_MA_mv()

  • All versions of fit_MA_mv in ManyAnalysts are equal
  • Note that fit_MA_mv is a wrapper function around fit_metafor_mv, and calls it explicitly.
  • move fun into ManyEcoEvo
  • rm from ManyAnalysts

Either:

  • update calls in ManyAnalysts with ManyEcoEvo::fit_MA_mv OR
    • move calls into targets pipeline?

@egouldo egouldo added feature a feature request or enhancement and removed enhancement labels Aug 8, 2024
egouldo added a commit that referenced this issue Sep 1, 2024
---

extract straight from object for plotting
egouldo added a commit that referenced this issue Sep 2, 2024
…argets data build

---

(i.e. with `mod_glance` list-column being output in `ManyEcoEvo_*_viz`)
egouldo added a commit that referenced this issue Sep 2, 2024
egouldo added a commit that referenced this issue Sep 2, 2024
egouldo added a commit that referenced this issue Sep 2, 2024
…t logged model fitting is in `ManyEcoEvo::`
egouldo added a commit that referenced this issue Sep 2, 2024
…_effects` model

don't select `effects_analysis` only because `ManyEcoEvo*` are no longer grouped tibbles and selection drops required columns that were previously grouping columns.
egouldo added a commit that referenced this issue Sep 2, 2024
Includes updated data objects that have list-column `mod_glance` which is the result of `broom::glance()`, now called in package wrappers rather than having to call inside manuscript.
egouldo added a commit that referenced this issue Sep 2, 2024
logged analysis moved into `ManyEcoEvo::` now #42
egouldo added a commit that referenced this issue Sep 2, 2024
`broom::glance()` is run in `ManyEcoEvo::`, does not need to be recalculated
egouldo added a commit that referenced this issue Sep 2, 2024
…d in yi meta-analysis #42

`ifelse()` statement on non-grouped outputs was resulting in same value for all rows, switch to `case_match()` instead.
egouldo added a commit that referenced this issue Sep 2, 2024
egouldo added a commit that referenced this issue Sep 2, 2024
don't filter out columns that don't exist

---

Note that don't need to add the `left_join()` call to add on `effects_analysis` data as `cross_join()` can figure out itself what to do with the list-column.
egouldo added a commit that referenced this issue Sep 2, 2024
egouldo added a commit that referenced this issue Sep 2, 2024
egouldo added a commit that referenced this issue Sep 2, 2024
And switch to colname `SE_calc` instead of `SD_calc`
egouldo added a commit that referenced this issue Sep 4, 2024
where replace values with NA for SE_calc, singularity, and CI_calc where model did not converge (makes no sense to report if model didn't fit)
egouldo added a commit that referenced this issue Sep 4, 2024
… for multivar analyses

feat!: Also check whether SE and CI for random effects can be calculated
egouldo added a commit that referenced this issue Sep 4, 2024
egouldo added a commit that referenced this issue Sep 4, 2024
egouldo added a commit that referenced this issue Sep 4, 2024
Relates to #42 need to filter out expertise subsets and collinearity subsets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant