powered by
Given x and y data compute simple linear regression slope and intercept, with errors by quadrature.
linear_regression(x, x_err, y, y_err)
A data frame of linear regression slope, intercept, and associated errors
Required. vector of independent variables.
Required. vector of independent variable errors.
Required. Vector of dependent variables.
Required. Vector of dependent variable 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)
Run the code above in your browser using DataLab