Action Clean fields, apply filters, and add derived columns.
OutputRdata/data_clean/proceed_clean_filtered.rds
Next Calculate SAFE lnM effect sizes.
Code
source(here::here("Scripts", "00_packages.R"))source(here::here("Scripts", "01_paths.R"))source(here::here("Scripts", "02_read_clean_data.R"))source(here::here("Scripts", "03_filters.R"))source(here::here("Scripts", "15_render_guard.R")) # read-only: never rebuild the database# The cleaned/filtered contrast dataset is cached as an .rds. The book READS it# by default. Set to TRUE only to rebuild the database from the raw PROCEED CSV.rebuild_clean_data <-FALSEclean_path <- here::here("Rdata", "data_clean", "proceed_clean_filtered.rds")
This chapter produces the cleaned, filtered contrast dataset used throughout the book. A normal render reads the saved file. The rebuild chunk runs only when rebuild_clean_data <- TRUE.
2.1 Action: clean and filter
The steps applied when (re)building the dataset:
read_proceed() - read the raw PROCEED v6.2 rates database.
clean_proceed() - coerce grouping/categorical variables to factors.
require_lnm_vars() - keep contrasts with the two-group summary statistics required for \(\ln M\): means, standard deviations, and sample sizes for both groups.
filter_generations(max_gen = 300) - retain contrasts with a known, positive elapsed-generation value no greater than 300; missing generation information is excluded.