Description Usage Arguments Details Value Examples
Rename strings/variable from inla
to brms
equivalent.
1 |
x |
Character with |
Rename variables and names in inla
to be easier to use in plots
and summary by using the brms
as closely as possible. For example
(Intercept) becomes Intercept, Beta for A becomes
b_A and "Precision for the Gaussian observations" becomes
Precision.
Character with inla strings renamed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | df <- data.frame(
x = c(
NA_character_,
"Precision for the Gaussian observations",
"SD for the Gaussian observations",
"sd for the Gaussian observations",
"unknown", "(Intercept)",
"Beta for A", "Beta for B", "Beta for B"),
y = c(NA_character_,
"Precision", "sigma", "sigma",
"unknown", "b_Intercept",
"b_A","b_B", "b_B"))
z <- rename_inla2brms(df$x)
stopifnot(identical(z, df$y))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.