View source: R/center_variables.R
center_variables | R Documentation |
center_variables() computes the centered variables for mixed models
center_variables(data, variable, name)
data |
a data frame with variables id_j (cluster variable), and id_k (higher cluster, e.g., country) |
variable |
variable to be center |
name |
acronym for the generated variables |
a data frame, including the center variables
library(dplyr)
data_model %>%
center_variables(data = ., variable = sex , name = sex) %>%
dplyr::glimpse()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.