type_lm: Linear model plot type

View source: R/type_lm.R

type_lmR Documentation

Linear model plot type

Description

Type function for plotting a linear model fit. Arguments are passed to lm.

Usage

type_lm(se = TRUE, level = 0.95)

Arguments

se

logical. If TRUE, confidence intervals are drawn.

level

the confidence level required.

Examples

# "lm" type convenience string
tinyplot(Sepal.Width ~ Petal.Width, data = iris, type = "lm")

# Grouped model fits (here: illustrating an example of Simpson's paradox)
tinyplot(Sepal.Width ~ Petal.Width | Species, data = iris, type = "lm")
tinyplot_add(type = "p")

# Use `type_lm()` to pass extra arguments for customization
tinyplot(Sepal.Width ~ Petal.Width, data = iris, type = type_lm(level = 0.8))

tinyplot documentation built on April 12, 2025, 9:15 a.m.