grouped_glm: Function to run generalized linear model ('glm') across...

Description Usage Arguments Value See Also Examples

View source: R/grouped_glm.R

Description

Function to run generalized linear model (glm) across multiple grouping variables.

Usage

1
2
3
4
5
6
7
8
grouped_glm(
  data,
  grouping.vars,
  ...,
  output = "tidy",
  tidy.args = list(conf.int = TRUE, conf.level = 0.95),
  augment.args = list()
)

Arguments

data

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

grouping.vars

Grouping variables.

...

Additional arguments to broom::tidy, broom::glance, or broom::augment S3 method.

output

A character describing what output is expected. Two possible options: "tidy" (default), which will return the results, or "glance", which will return model summaries.

tidy.args

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

augment.args

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

Value

A tibble dataframe with tidy results from linear model.

See Also

grouped_lm, grouped_lmer, grouped_glmer

Examples

1
2
3
4
5
6
groupedstats::grouped_glm(
  data = mtcars,
  formula = am ~ wt,
  grouping.vars = cyl,
  family = stats::binomial(link = "logit")
)

groupedstats documentation built on May 29, 2021, 1:06 a.m.