extract_lm: Extract parameters from stats::lm-models

Description Usage Arguments Value Author(s) Examples

View source: R/extract.R

Description

Function extracts coefficients and p-values from stats::lm-models

Usage

1
extract_lm(model, var, parameter)

Arguments

model

The stats::lm-model (must be build in advance)

var

Name of Variable for with parameter should be extracted. Put in "".

parameter

"b" = coefficient, "p" = p-value

Value

returns "b = ..." or "p = ..."

Author(s)

Dominik Vogel

Examples

1
2
model <- stats::lm(mpg ~ cyl + am, data = mtcars)
extract_lm(model, "cyl", "p")

DominikVogel/vogelR documentation built on May 23, 2019, 4:12 p.m.