View source: R/linear_regression.R
| linear_regression | R Documentation |
Given x and y data compute simple linear regression slope and intercept, with errors by quadrature.
linear_regression(x, x_err, y, y_err)
x |
Required. vector of independent variables. |
x_err |
Required. vector of independent variable errors. |
y |
Required. Vector of dependent variables. |
y_err |
Required. Vector of dependent variable errors. |
A data frame of linear regression slope, intercept, and associated errors
John Zobitz zobitz@augsburg.edu
y<- c(345,432,233)
y_err <- c(1,5,6)
x <- c(0.01,0.04,0.17)
x_err <- c(0.1,.3,.6)
linear_regression(x,x_err,y,y_err)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.