Hi I have a question concerning R, statistics, regression and Summary(lm(....))

When using R and the summary(lm(..)) function I get an output like that:

enter image description here

I pretty much know what each of the numbers means but it is not clear for me what the estimate and std Error are calculated from.

When I plot a plot like that

enter image description here

I have 32 (x/y)-Datapoints. Now I fit a linear model and get a beta0 as well as an beta1. What exactly are beta0 and beta1 calculated from ?

  • the residuals ? ( do I get 32 distances from where I calculate the estimate+ StdError ?)
  • the slope ? ( do I get the first point, fit a line through this point-> get one beta1, take the second point and fit a line through these 2 pts -> get another beta1,... Then I take the Estimate + StdError of 32 beta1`s ?)

migrated from stackoverflow.com Oct 25 '17 at 2:41

This question came from our site for professional and enthusiast programmers.

  • 2
    $\begingroup$ It sounds like you need some basic background information. I would start here, here, here, and here. The first three are clearly written, beginner-level pieces on understanding output from R's lm() and plotting, while the last one is the Wikipedia on how you estimate OLS coefficients. $\endgroup$ – duckmayr Oct 24 '17 at 19:28
  • 3
    $\begingroup$ It sounds like you aren't really asking a programming question as much as a statistics question. I think you just need to read up on how to fit a multiple linear regression. $\endgroup$ – Dason Oct 24 '17 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy