my_lm: Linear Model

Description Usage Arguments Value Examples

View source: R/my_lm.R

Description

This function fits a linear model in R

Usage

1

Arguments

data

input data frame

formula

a formula class object

Value

table with rows for each coefficient and columns for the estimate, standard error, t value, and Pr(>|t|)

Examples

1
2
3
4
5
6
# my_lm(formula, x)
# my_lm(formula, y)
x <- 1 : 50
y <- rnorm(50, mean = 25, sd = 10)
z <- rnorm(50, mean = 25, sd = 5)
my_data <- data.frame("X" = x, "Y" = y, "Z" = z)

jacklorrengriffin/myfirstpackage documentation built on Dec. 20, 2021, 8:05 p.m.