Generalized linear model plot type

Description

Type function for plotting a generalized model fit. Arguments are passed to glm.

Usage

type_glm(
  family = "gaussian",
  se = TRUE,
  level = 0.95,
  type = "response",
  weights = NULL
)

Arguments

family a description of the error distribution and link function to be used in the model. For glm this can be a character string naming a family function, a family function or the result of a call to a family function. For glm.fit only the third option is supported. (See family for details of family functions.)
se logical. If TRUE, confidence intervals are drawn.
level the confidence level required.
type character, partial matching allowed. Type of weights to extract from the fitted model object. Can be abbreviated.
weights an optional numeric vector of observation weights for the model fit, of the same length as the number of data points. Weights can also be supplied via the top-level weights argument of tinyplot (which is evaluated with non-standard evaluation in the formula method, and takes precedence if both are given).

Examples

library("tinyplot")

# "glm" type convenience string
tinyplot(am ~ mpg, data = mtcars, type = "glm")

# Use `type_glm()` to pass extra arguments for customization
tinyplot(am ~ mpg, data = mtcars, type = type_glm(family = "binomial"))