make_regression_graph: Make a graph of coefficient values and 95 percent confidence...

View source: R/stats.R

make_regression_graphR Documentation

Make a graph of coefficient values and 95 percent confidence interval for regression.

Description

Make a graph of coefficient values and 95 percent confidence interval for regression.

Usage

make_regression_graph(model, coefficients = NULL)

Arguments

model

A 'lm' object made from making a model using 'lm()'.

coefficients

A string or vector of strings with the coefficient names. Will then make the graph only with those coefficients.

Value

Outputs a 'ggplot2' graph

Examples

make_regression_graph(model = lm(mpg ~ cyl + disp + hp + drat, data = mtcars))
make_regression_graph(model = lm(mpg ~ cyl + disp + hp + drat, data = mtcars),
coefficients = c("cyl", "disp"))
make_regression_graph(model = lm(mpg ~ cyl + disp, data = mtcars))

crimeutils documentation built on Dec. 7, 2022, 5:15 p.m.