grouped_tidy: Grouped tidy analysis

View source: R/grouped_generics.R

grouped_tidyR Documentation

Grouped tidy analysis

Description

Tidy output from grouped analysis of any function that has data argument in its function call

Usage

grouped_tidy(data, grouping.vars, ..f, ..., tidy.args = list())

Arguments

data

Dataframe (or tibble) from which variables are to be taken.

grouping.vars

Grouping variables.

..f

A function, or function name as a string.

...

<dynamic> Arguments for .fn.

tidy.args

A list of arguments to be used in the relevant S3 method.

Value

A tibble::tibble() with information about model components.

See Also

tidy

Examples

set.seed(123)
library(dplyr)

# linear mixed effects model
grouped_tidy(
  data = mutate(MASS::Aids2, interval = death - diag),
  grouping.vars = sex,
  ..f = lme4::lmer,
  formula = interval ~ age + (1 | status),
  control = lme4::lmerControl(optimizer = "bobyqa"),
  tidy.args = list(conf.int = TRUE, conf.level = 0.99)
)

broomExtra documentation built on April 2, 2022, 5:05 p.m.