Ivan Jacob Agaloos Pesigan 2020-12-31
jeksterslabRlinreg
is a collection of functions that I find useful in studying linear regression concepts and methods.
You can install the released version of jeksterslabRlinreg
from GitHub with:
library(devtools)
install_github("jeksterslabds/jeksterslabRlinreg")
In this hypothetical example, we are interested in the association between wages and education. The regressor variable is years of education. The regressand variable is hourly wage in US dollars.
#> constant education
#> [1,] 1 16
#> [2,] 1 8
#> [3,] 1 15
#> [4,] 1 14
#> [5,] 1 13
#> [6,] 1 13
#> wages
#> [1,] 12.745092
#> [2,] 13.927995
#> [3,] 19.848912
#> [4,] 9.619895
#> [5,] 9.272206
#> [6,] 11.652715
jeksterslabRlinreg::linreg()
The jeksterslabRlinreg::linreg()
function fits a linear regression model using X
and y
. In this example, X
consists of a column of constants and years of education
and y
consists of hourly wages
in US dollars.
The output includes the following:
jeksterslabRlinreg::linreg(
X = X,
y = y
)
See GitHub Pages for package documentation.