# Calculate sample statistics for estimated parameters of a model [duplicate]

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?

• 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. Sep 24, 2014 at 11:37
• 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. Sep 24, 2014 at 12:37
• @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 Sep 24, 2014 at 13:50
• @Glen_b reading aman's comments just now I'm not sure he realizes that. Sep 24, 2014 at 13:52
• @ssdecontrol The last sentence of the question (as it stood at the time of closure) reinforces that understanding of the question. Sep 24, 2014 at 14:16