Description Usage Arguments Value See Also Examples
A function to convert effect estimates into percentage changes for use in line in
publications. It can either convert an effect estimate with lower and upper confidence intervals that
is unformated into a pretty formated percentage or it can convert a pretty_ci
formatted effect size into a pretty formated percentage.
1 2 3 |
est |
A numeric or character vector of estimates. |
lci |
A numeric or character vector of lower confidence/credible intervals. |
uci |
A numeric or character vector of upper confidence/credible intervals. |
string |
Logical, defaults to |
sep |
A character vector indicating the seperator used between the upper and lower confidence/credible intervals. The default is ' to '. |
note |
A character vector indicating the explanatory note to be used. |
replace_bracket |
Logical, defaults to |
digits |
Integer indicating the number of decimal places to be used. |
inline |
Logical operator indicating whether an explanatory note is required. |
percentage |
A logical (defaults to |
effect_direct |
A character string indicating the direction of the percentage. Can be specified as "increase" or "decrease" (defaults to "increase"). |
... |
Pass additional arguements to |
A pretty formated percentage with confidence intervals
pretty_ci
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | est <- 1.2
lci <- 1.1
uci <- 1.3
## As unformated effects
pretty_per_effect(est, lci, uci)
## As formated effects
x <- pretty_ci(est, lci, uci, inline = TRUE)
pretty_per_effect(x, string = TRUE, inline = TRUE)
## For a decrease
pretty_per_effect(x, string = TRUE, inline = TRUE, effect_direct = "decrease")
## For difference seperations between strings (vectorised)
x <- pretty_ci(est, lci, uci, inline = TRUE, sep = ", ")
x <- c(x, x)
pretty_per_effect(x, string = TRUE, inline = TRUE)
## For a decrease
pretty_per_effect(x, string = TRUE, inline = TRUE, effect_direct = "decrease")
## Vectorised (as a string)
est <- c(est, 1.1)
lci <- c(lci, 1)
uci <- c(uci, 1.2)
pretty_per_effect(est, lci, uci)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.