my_lm: Linear Model

Description Usage Arguments Value Examples

View source: R/my_lm.R

Description

This function performs multiple regression using a given formula and dataset.

Usage

1

Arguments

formula

An object of class 'formula', which represents the overall relationship between our predictor variable(s) from data and our response variable from data.

data

An input data frame from which formula extracts from.

Value

A 'table' with rows for the coefficients of each predictor variable (including the intercept) and columns for their estimated value, standard error, t-value, and p-value ('Estimate', 'Std. Error', 't value', and 'Pr(>|t|)' respectively).

Examples

1
2
my_lm(Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width, my_iris)
my_lm(lifeExp ~ gdpPercap + continent, my_gapminder)

marquesjchacon/myfirstpackage documentation built on April 2, 2020, 9:42 p.m.