my_lm: My Linear Model (lm) function

Description Usage Arguments Value Examples

View source: R/my_lm.R

Description

This function fits and summarizes the results of a linear model estimated with Ordinary Least Squares.

Usage

1

Arguments

formula

A formula object Y~X.

data

A data frame or matrix.

Value

Returns a list object with a model table containing the coefficients, t-values, degrees of freedom, and p-values computed from the t-distribution. These regression coefficients should be exactly the same as the base R lm().

Examples

1
2
my_lm(lifeExp ~ gdpPercap,data = gapminder :: gapminder)
my_lm(lifeExp ~ gdpPercap + country ,data = gapminder :: gapminder)

theloniousgoerz/tgpackage documentation built on Dec. 23, 2021, 9:54 a.m.