check_fn_args_comp_mms_var_boot: Assertion Checks for all 'comp_mms_var' function bootstrap...

Description Usage Arguments Value Examples

View source: R/ols-var.R

Description

check_fn_args_comp_mms_var_boot is used to assess whether the arguments are correctly specified in list format and returns an error message if they do not match the correct specification

Usage

1
check_fn_args_comp_mms_var_boot(boot_emp, boot_sub, boot_res, boot_mul)

Arguments

boot_emp

(list) In the case of empirical bootstrap the expected input is of the form #' list(B = 10, m = 100). Here the named element m is optional e.g. list(B = 10) is valid, or passed in as an explicit NULL e.g. list(B = 10, m = NULL). Note that technically B, m should both be positive integers, but this assertion checking is handled explicitly in the comp_boot_emp function. So although passing in list(B = -15, m = -20) will pass this function without errors, these will be addressed explicitly in comp_boot_emp as invalid inputs.

boot_sub

(list) TODO: ADD

boot_res

(list) : In the case of residual bootstrap the expected input is of the form list(B = 10). Note that technically B should be a positive integer, but this assertion checking is handled explicitly in the comp_boot_res function. So although passing in list(B = -15) will pass this function without errors, these will be addressed explicitly in comp_boot_res as invalid inputs.

boot_mul

(list) : In the case of multiplier bootstrap the expected input is of the form list(B = 10, weights_type = "rademacher"). Here the named element weights_type is optional e.g. list(B = 10) is valid, or passed in as an explicit NULL e.g. list(B = 10, weights_type = NULL). Note that technically B should be a positive integer, and weights_type should be a character vector (see comp_boot_mul), but this assertion checking is handled explicitly in the comp_boot_mul function. So although passing in list(B = -15, m = "test") will pass this function without errors, these will be addressed explicitly in comp_boot_mul as invalid inputs.

Value

A summary statistics tibble for the bootstrap input.

: A TRUE if assertions pass, or an error if there is an assertion failure.

Examples

1
2
3
4
5
6
7
## Not run: 
# Expect all assertions to pass
check_fn_args_comp_mms_var_boot(boot_emp = list(B = 1e4, m = 600),
                            boot_res = NULL,
                            boot_mul = NULL)

## End(Not run)

shamindras/maar documentation built on Sept. 19, 2021, 10:21 p.m.