This document describes the workflow for refitting the submitted models and extracting relevant variables in preparation for the meta-analysis of the MSA data.
Each analyst codes a subset of the MSA data. Accordingly, each analyst downloads only their subset of OSF components with the data from the teams analyses.
To do so, run the code in
scripts/r/03-analyses-coding.Rmd
.
When prompted by the code, select your identity. A folder with your
initials will be created in data/analyses/
. For
example:
The rest of the code will download the OSF components into that directory. (Total size will be ~1 to 4 GB).
Pick one of the downloaded teams components (see Analyses coding).
Create a new heading in your refit file
(scripts/r/04-refit/refit-xx.Rmd
with the name of the
team).
Find the relevant analysis script of the team
converged_orig
).scripts/r/04-refit/refit-xx.Rmd
).Inside your refit file, MSA team member reruns relevant analyses.
atypical
as
reference and use dummy coding. Rename predictor to
effect_cat
.atypical
as
reference and use dummy coding. Rename predictor to
effect_cat
.effect_con
.Y ~ sex
, you rerun
Y ~ sex + effect_cat
).Run standardized model with default priors or with original priors if original model was Bayesian and standardised.
If model does not converge, flag in sheet (column
converged_std
. Non-convergence is operationalized as over
20% of the posterior containing divergent transitions.
adapt_delta
to 0.99, 0.9999, etc.max_treedepth
to 12, 14,
etc.Save model as .rds file to the
models directory
(data/analyses/models
).
.rds
object name should include the team name, the
model number, the outcome variable (use single words, without
underscores: int
, nounint
,
adjint
, phrasef0
, …, and whether typicality
was categorical or continuous (cat
, con
).
Separate information using underscores. Here are two examples:
haematopus_fossor_9_nounvowelcent_cat
,
lasionycteris_altavela_1_int_con
.Below is an example of a fitted model following
all the above naming conventions (Note: it also uses the
file
argument to automatically save the .rds file):
lasionycteris_altavela_1_int_con <- brm(
int_z ~ effect_con +
(1 | target_name) +
(1 | filename) +
(1 | filename:target_name),
data = MSA_df,
cores = 4,
threads = threading(2, grainsize = 100),
backend = "cmdstanr",
file = here("data", "analyses", "models", "lasionycteris_altavela_1_int_con")
)
Repeat for all analyses of MSA team member’s subset.
Once you have refitted the models, check instructions on how to
Upload refitted models to OSF in
04-1_refitted.Rmd
.