my_lm: Linear Model Constructor

Description Usage Arguments Value Examples

View source: R/my_lm.R

Description

This function does the linear regression depend on the input formula and data and return a table as result.

Usage

1

Arguments

formula

Formula class object input shows the relationship between independ and depend variable.

data

Data frame input contains the variables in the model.

Value

A table includes Estimate, a column of Estimate Coefficients; Std. Error, a column of Residual Standard Error; t value, a column of Estimate divided by Std.Error; and p value, a column of P-values corresponding to t value in the T distribution.

Examples

1
2
data(mtcars)
my_lm(mpg ~ hp + wt, data = mtcars)

Chaos-Gao/MyStat302Package documentation built on March 20, 2021, 2 p.m.