Description Usage Arguments Value Examples
View source: R/linear_regression.R
linear_regression
1 2 3 4 5 6 7 8 9 10 11 12 | linear_regression(
y,
x,
intercept = T,
y_bars = F,
ss = F,
variances = F,
t_test = F,
f_test = F,
hat_matrix = F,
residuals = F
)
|
y |
a vector, outcomes. |
x |
a numerical matrix, each row represents an observation and each column represents a covariate. |
intercept |
a logical value, TRUE by default, indicating should the function include a intercept for the user. |
y_bars |
a logical value, indicating should the function output the estimated y's. It is FALSE by default, but will be set TRUE if either ss, variances, t_test, f_test or residuals is set TRUE |
ss |
a logical value, indicating should the function output sum of squares. It is FALSE by default, but will be set TRUE if either variances, f_test or t_test is set TRUE |
variances |
a logical value, indicating should the function output variances. It is FALSE by default, but will be set TRUE if t_test is set TRUE |
t_test |
a logical value, indicating should the function output results of t test. |
f_test |
a logical value, indicating should the function output results of f test. |
hat_matrix |
a logical value, indicating should the function output the hat matrix. |
residuals |
a logical value, indicating should the function output residuals. |
the regression result, a list
1 | linear_regression(c(3,5,6),c(1,2,3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.