Learn R Programming

bivarhr (version 0.1.5)

summarise_placebo_top3_posthoc: Summarise top-3 temporal placebo results

Description

Summarises the three strongest temporal placebo results (based on the difference between original and permuted ELPD) from a temporal permutation test.

Usage

summarise_placebo_top3_posthoc(placebo_tab, dir_csv)

Value

A data frame with up to three rows and columns:

  • model: constant string "PlaceboTemporal".

  • config: text of the form "perm=<id>".

  • elpd_orig, elpd_perm, diff: original ELPD, permuted ELPD, and their difference.

If no data are available, a single-row data frame with NA

entries is returned.

Arguments

placebo_tab

Optional data frame with placebo results, typically containing columns perm, elpd_orig, elpd_perm, and diff. If NULL or empty, the function attempts to read "placebo_temporal.csv" from dir_csv.

dir_csv

Character scalar; directory where the placebo CSV file is stored.

Details

The table is ordered by decreasing diff (ELPD gain of the original fit over the permuted fit), and the top three permutations are retained.