my_lm: Linear model

Description Usage Arguments Value Examples

View source: R/my_lm.R

Description

This function fits a linear model.

Usage

1
my_lm(formula, data, pp = 0)

Arguments

formula

A formula class object (same as lm()).

data

A data frame.

pp

A numeric specifying the scientific notation precision for the values in the returned table.

Value

A table containing the following cols for each coefficient: Estimate (expected change in the response due to a unit change in the feature), Std. Error (standard error of the estimate), t value (t-statistic), and Pr(>|t|) (p-value).

Examples

1
2
my_lm(mpg ~ hp + wt, data = mtcars, pp = 5)
my_lm(mpg ~ hp + wt, data = mtcars)

smokingcrater/STAT302Package documentation built on Dec. 23, 2021, 3:27 a.m.