calculate: Calculate PsN bootstrap confidence intervals

calculate_ciR Documentation

Calculate PsN bootstrap confidence intervals

Description

calculate_ci() calculates confidence intervals from PsN bootstraps.

Usage

calculate_ci(x, parameter = "THETA3", ci_width = 95, exclusions = c(1, 2))

Arguments

x

A tibble corresponding to PsN bootstrap output. calculate_ci() is meant to be run after running combine_bootstraps() but will also work with an imported raw_results_run#.csv file created by PsN.

parameter

The parameter of interest. Defaults to THETA3.

ci_width

The desired confidence interval width. Defaults to 95 for a 95% confidence interval.

exclusions

A numeric vector corresponding to the desired PsN exclusions. Defaults to c(1, 2) for exclusions 1 and 2, the default PsN exclusions. The available exclusions are:

  • Exclusion 1: Skip if minimization_successful == 0.

  • Exclusion 2: Skip if estimate_near_boundary == 1.

  • Exclusion 3: Skip if covariance_step_successful == 0.

  • Exclusion 4: Skip if covariance_step_warnings == 1.

Value

A tibble that contains:

  • n_original: The total number of rows.

  • n_used: The number of successful runs used to calculate the confidence interval.

  • n_excluded: The number of excluded runs.

  • parameter: The parameter of interest.

  • ci_width: The width of the confidence interval.

  • lower_ci: The lower value of the calculated confidence interval.

  • point_estimate: The point estimate from the original dataset.

  • upper_ci: The upper value of the calculated confidence interval.

calculate_ci() also provides verbose output in the console listing the values of n_original, n_used, n_excluded, the exclusions used, and a printed tibble with the variables above.


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