my_lm: Linear fit generator

Description Usage Arguments Value Examples

View source: R/my_lm.R

Description

Performs a linear fit on data given a formula.

Usage

1

Arguments

formula

Formula class object to fit data to.

data

Data frame that will be fit onto formula.

Value

Table of coefficients generated through the linear fit. Contains the estimates of the coefficients of the variables provided in the formula (and the intercept), the standard error of these estimates, the corresponding t values, and the p values of these t values for each coefficient.

Examples

1
2
3
4
x <- c(0.5, 0.8, 1.5, 0.5, 0.2)
y <- c(1.0, 1.2, 0.1, 0.2, 1.4)
df <- cbind(data.frame(y), data.frame(x))
my_lm(y ~ x, df)

BenjaminLowry/project3package documentation built on March 21, 2021, 4:34 a.m.