Description Usage Arguments Value Examples
Linear mixed-effects model (lmer) across multiple grouping
variables.
1 2 3 4 5 6 7 8 9  | 
data | 
 Dataframe (or tibble) from which variables are to be taken.  | 
grouping.vars | 
 Grouping variables.  | 
... | 
 Arguments passed on to  
  | 
output | 
 A character describing what output is expected. Two possible
options:   | 
tidy.args | 
 A list of arguments to be used in the relevant   | 
augment.args | 
 A list of arguments to be used in the relevant   | 
A tibble dataframe with tidy results from a linear mixed-effects
model. Note that p-value is computed using parameters::p_value.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  | # for reproducibility
set.seed(123)
# loading libraries containing data
library(gapminder)
# getting tidy output of results
# let's use only subset of the data
groupedstats::grouped_lmer(
  data = gapminder,
  formula = scale(lifeExp) ~ scale(gdpPercap) + (gdpPercap | continent),
  grouping.vars = year,
  REML = FALSE,
  tidy.args = list(effects = "fixed", conf.int = TRUE, conf.level = 0.95),
  output = "tidy"
)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.