Description Usage Arguments Details Value See Also Examples
View source: R/get_signif_code.R
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).
1 | get_signif_code(p_val)
|
p_val |
A vector with the p-values of the smoothing term. |
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) |
The function returns a character vector of the same length then the input vector, with one symbol for each p-value.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.