lm_s: lm_s

Description Usage Arguments Value Examples

View source: R/lm_s.R

Description

The lm_s function will fit a linear model using given data set. It will automatically print summary of coefficients and anova table of the model. The function may not treat interaction terms correctly and cannot fit a model without an intercept properly.

Usage

1

Arguments

formula

The same object of class "formula" as the origin R function lm(): a symbolic description of the model to be fitted.

data

an optional data frame, list containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which lm_s is called.

Value

The function returns the Coefficients' matrix which contain the value, S.E, t-statistics and p-value of each coefficient. The function also will automatically print summary of coefficients and anova table of the model.

Examples

1
2
3
4
5
y = rnorm(1000)
x = rnorm(1000)
z = rnorm(1000)
lm_s(y ~ x)
lm_s(y ~ x+z)

yt-pan/lm.Bios625.Package.2021 documentation built on Dec. 23, 2021, 8:18 p.m.