get_signif_code: Create a code indicating the significance of values given by...

Description Usage Arguments Details Value See Also Examples

View source: R/get_signif_code.R

Description

get_signif_code is a helper function for model_gam and model_gamm to create an easy-to-read output for the significance of the smoothing term in the GAM(M)s (shown in the signif_code column of the output tibbles).

Usage

1

Arguments

p_val

A vector with the p-values of the smoothing term.

Details

The following code is adopted from summary.gam:

" " = not significant (> .1)
"." = close to significant (.05 < .1)
"*" = significant (.01 < .05)
"**" = highly significant (.001 < 0.01)
"***" = absolute significant (<= .001)

Value

The function returns a character vector of the same length then the input vector, with one symbol for each p-value.

See Also

model_gam, model_gamm

Examples

1
2
x <- tibble::tibble(p_val = list("test", NA, runif(1, 0, .1), runif(1, 0, .01)))
x$code <- get_signif_code(x$p_val)

saskiaotto/INDperform documentation built on Oct. 27, 2021, 10:33 p.m.