my_lm: My linear model function

Description Usage Arguments Value Examples

View source: R/my_lm.R

Description

This function fits a linear model in R.

Usage

1

Arguments

formula

a formula class object, a symbolic description of the model to be fitted.

data

input data frame.

Value

a summary table: Estimate, the beta value; Std. Error, the standard error; t value the t value; Pr(>|t|), the p value.

Examples

1
2
3
4
data(mtcars)
my_lm(mpg ~ hp + wt, data = mtcars)
data(my_gapminder)
my_lm(pop ~ gdpPercap, data = my_gapminder)

atlasyao/happypackage documentation built on March 23, 2020, 5:23 a.m.