Description Usage Arguments Value Examples
Compute the OLS linear regression for a given X and y. This is the most simple case of ordinary least square. In fact, this function will not perform any error checking because it's used as a internal function of least_square.
1 | simple_ols(X, y)
|
X |
input X, it should be a matrix. |
y |
input y, this is the respond variable. |
it will return coefficient of beta, but it won't compute anything other than beta, such as R^2.
1 | simple_ols(matrix(c(1,3,7,4,6,3),3,2), c(3,1,2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.