combine: Combine PsN bootstraps

combine_bootstrapsR Documentation

Combine PsN bootstraps

Description

combine_bootstraps() extracts and row-binds model estimates of PsN bootstraps into a tibble.

Usage

combine_bootstraps(path, runs = "bs_run1", out = "bootstrap_combined.csv")

Arguments

path

The path to the working directory containing PsN bootstrap folders. Defaults to here::here().

runs

A character vector of folder names to be searched. Defaults to bs_run1 per default PsN settings.

out

The name of the output .csv file. Defaults to bootstrap_combined.csv.

Details

combine_bootstraps() searches inside all folders specified by the runs argument for model estimates of PsN bootstraps.

By PsN convention, each bootstrap folder has a file of the general form raw_results_run#.csv that contains estimates for the original and bootstrapped models. The first row in each raw_results_run#.csv file corresponds to the original dataset. To avoid duplicating the row corresponding to the original dataset, combine_bootstraps() keeps only the first row of the first .csv file passed to the runs argument. combine_bootstraps() throws an informative warning if the column names or the first row of each raw_results_run#.csv file are not identical.

combine_bootstraps() creates a new .csv file in the working directory, specified by the out argument, that contains the combined estimates of PsN bootstraps.

Value

A tibble containing the row-bound model estimates of PsN bootstraps.


gvelasq/nmtools documentation built on April 9, 2022, 7:13 a.m.