How some standard package (eg R, SAS or Excel) calculate Standard error for the estimated parameters for a model.

my understanding :
While using gradient descent optimization method( as performed in Machine learning tutorial from Andrew Ng) we get a point estimate (right?) But suppose I have to find the confidence interval of the estimated parameters we'll have to form multiple samples using bootstrap(or any other method?) to find parameters for each sample. Then we can calculate the sample mean , std error and thus call Z-score to calculate the confidence interval of the estimate.

Am I thinking in the correct direction?

  • $\begingroup$ Bootstrapping can be a good method of getting confidence intervals, but it is not usually a default method and there are others! Why flag R here? Do you imagine R is doing something non-standard when it does linear regression? In any case, which packages, functions, etc. do you have in mind? If this is really about specific software, you need to say which and give much more detail, but then the question would be off-topic here. If this is a general question about regression, you should search the forum for previous questions, as it doesn't seem that you have a specific new question. $\endgroup$
    – Nick Cox
    Commented Sep 24, 2014 at 11:37
  • $\begingroup$ I'm not sure this is a duplicate. I think the question is asking "how do I calculate confidence intervals when using gradient descent rather than OLS?" The answer, of course, is that the formula is the same regardless of how you actually calculate the point estimates. But I still don't think it's a dupe. $\endgroup$ Commented Sep 24, 2014 at 12:37
  • $\begingroup$ @ssdecontrol I think the title is explicit. If that's not what the main import of what is being asked, it shouldn't be the title $\endgroup$
    – Glen_b
    Commented Sep 24, 2014 at 13:50
  • $\begingroup$ @Glen_b reading aman's comments just now I'm not sure he realizes that. $\endgroup$ Commented Sep 24, 2014 at 13:52
  • $\begingroup$ @ssdecontrol The last sentence of the question (as it stood at the time of closure) reinforces that understanding of the question. $\endgroup$
    – Glen_b
    Commented Sep 24, 2014 at 14:16

1 Answer 1


In linear regression the slopes are typically estimated using ordinary least squares.


Not the answer you're looking for? Browse other questions tagged or ask your own question.