my_lm: Fitting Linear Models

Description Usage Arguments Value Examples

View source: R/my_lm.R

Description

This function is used to fit linear models on a data set.

Usage

1

Arguments

formula

A "formula" class object that describes the model to be fitted, typically having the form response ~ terms.

data

Data frame containing the variables in the model.

Value

A table with rows for each coefficient and columns for the following: Estimate, Std. Error, t value, and Pr(>|t|).

Examples

1
2
3
4
5
# load mtcars data
data("mtcars")

my_lm(mpg ~ hp, mtcars)
my_lm(mpg ~ hp + wt, mtcars)

hchang23/firstpackage documentation built on March 18, 2020, 7:37 a.m.