Skip to contents

Generate Expertise Data Subsets

Usage

generate_expertise_subsets(ManyEcoEvo, expert_subset)

Arguments

ManyEcoEvo

a ManyEcoEvo dataframe containing formatted raw data, formatted diversity_data, the estimate_type, dataset, publishable_subset, and exclusion_set. See details.

expert_subset

a dataframe containing the column response_id containing response ID's to be included in the expert subset

Value

A ManyEcoEvo dataframe with added column expertise_subset with new subsets of data and diversity_data

Details

Note that this function needs to be run on ManyEcoEvo after the following functions have been run (See examples):

generate_rating_subsets() only creates expertise subsets based on the full dataset where exclusion_set == "complete" and publishable_subset == "All".

Examples

library(ManyEcoEvo)
library(tidyverse)
#> ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
#>  dplyr     1.1.4      readr     2.1.5
#>  forcats   1.0.0      stringr   1.5.1
#>  ggplot2   3.5.1      tibble    3.2.1
#>  lubridate 1.9.3      tidyr     1.3.1
#>  purrr     1.0.2     
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#>  dplyr::filter() masks stats::filter()
#>  dplyr::lag()    masks stats::lag()
#>  Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(targets)
ManyEcoEvo %>%
  prepare_response_variables(estimate_type = "Zr") |>
  generate_exclusion_subsets(estimate_type = "Zr") |>
  generate_rating_subsets() |>
  generate_expertise_subsets(ManyEcoEvo:::expert_subset)
#> 
#> ── Applying exclusion rules and generating exclusion subsets ───────────────────
#>  Standardising response variables for "Zr" estimates.
#> 
#> ── Computing meta-analysis inputsfor `estimate_type` = "Zr" ────────────────────
#> 
#> ── Computing standardised effect sizes `Zr` and variance `VZr` ──
#> 
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df 484.0193.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df 666.56874.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df 590.18263.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.006225,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.003996,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df 481.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.09247,
#> 3. adjusted_df 316.17526.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.029,
#> 3. adjusted_df 366.3.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.042,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.01416305,
#> 3. adjusted_df 257.905.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.030382264,
#> 3. adjusted_df 2372.82.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.01409,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.008781,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.014853,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.000769,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.033978443,
#> 3. adjusted_df 347.4992526.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.01823188,
#> 3. adjusted_df 55.44391.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.02039768,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.02496,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.03575,
#> 3. adjusted_df NA.
#> 
#> ── Computing meta-analysis inputsfor `estimate_type` = "Zr" ────────────────────
#> 
#> ── Computing standardised effect sizes `Zr` and variance `VZr` ──
#> 
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.29212,
#> 3. adjusted_df 21.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.007831,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.07216,
#> 3. adjusted_df 0.560867697.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.57,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.2328,
#> 3. adjusted_df 343.24787.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.3188723,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.0059286,
#> 3. adjusted_df 1.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.007385,
#> 3. adjusted_df 3.5e-25.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.052462,
#> 3. adjusted_df 3.5e-25.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.605,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 8.98,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 7.97,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 5.19,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 18.5,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 5.92,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.529,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 2.89,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.605,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.01312667,
#> 3. adjusted_df -2.6269353.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.197,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.192,
#> 3. adjusted_df 82.703.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.1,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se NA,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.0048042,
#> 3. adjusted_df 341.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.21,
#> 3. adjusted_df NA.
#>  Required values for computing standardised effect sizes missing:
#> ! Returning "NA" for tupple:
#> 1. beta_estimate NA,
#> 2. beta_se 0.5756016,
#> 3. adjusted_df 3.536992.
#> # A tibble: 14 × 7
#>    exclusion_set estimate_type dataset    data                diversity_data    
#>    <chr>         <chr>         <chr>      <named list>        <named list>      
#>  1 complete      Zr            blue tit   <tibble [131 × 40]> <tibble>          
#>  2 complete      Zr            eucalyptus <tibble [79 × 40]>  <tibble [79 × 61]>
#>  3 partial       Zr            blue tit   <tibble [118 × 40]> <tibble>          
#>  4 partial       Zr            eucalyptus <tibble [70 × 40]>  <tibble [70 × 61]>
#>  5 complete      Zr            blue tit   <tibble [109 × 6]>  <tibble>          
#>  6 complete      Zr            blue tit   <tibble [32 × 6]>   <tibble [32 × 54]>
#>  7 complete      Zr            eucalyptus <tibble [55 × 6]>   <tibble [55 × 61]>
#>  8 complete      Zr            eucalyptus <tibble [13 × 6]>   <tibble [13 × 61]>
#>  9 partial       Zr            blue tit   <tibble [100 × 6]>  <tibble>          
#> 10 partial       Zr            blue tit   <tibble [32 × 6]>   <tibble [32 × 54]>
#> 11 partial       Zr            eucalyptus <tibble [52 × 6]>   <tibble [52 × 61]>
#> 12 partial       Zr            eucalyptus <tibble [10 × 6]>   <tibble [10 × 61]>
#> 13 complete      Zr            blue tit   <tibble [89 × 40]>  <tibble [89 × 54]>
#> 14 complete      Zr            eucalyptus <tibble [34 × 40]>  <tibble [34 × 61]>
#> # ℹ 2 more variables: publishable_subset <chr>, expertise_subset <chr>