my_lm: Fitting Linear Models

Description Usage Arguments Value Examples

View source: R/my_lm.R

Description

This function fits a linear model in the form of the specified formula using the given data.

Usage

1

Arguments

formula

A formula class object that specifies the structure of the model.

data

A data frame that contains the variables of the model.

Value

A matrix in the form of a table that contains an estimate, standard error, t-value, and p-value of each coefficient.

Examples

1
2
3
4
5
6
## Load in the penguins data set included in project3part1package
data(my_penguins)
my_penguins <- na.omit(my_penguins)

my_lm(bill_length_mm ~ bill_depth_mm + flipper_length_mm, data = my_penguins)
my_lm(body_mass_g ~ bill_length_mm - 1, data = my_penguins)

thomson3uw/project3part1package documentation built on Dec. 23, 2021, 9:58 a.m.