7
$\begingroup$

I am fitting a GLM model (in R), and would like to get an estimation of the variability of the coefficients estimated by the model.

If I understand it correctly the method to use in such a case is bootstraping (not, cross validation).

Am I correct that an easy way to do this is by using the boot command from the boot package, then output the coefficients at each simulation, and at the end calculate their var? Or is there something I might be missing?

$\endgroup$
2
  • 3
    $\begingroup$ Any reason not to like the the standard errors produced by glm? $\endgroup$
    – Aniko
    Commented Aug 17, 2010 at 17:21
  • 4
    $\begingroup$ Standard error is a measure of the expected quality of your estimate while a standard deviation is a measure of variability. The former decreases with n while the latter does not. $\endgroup$
    – John
    Commented Aug 17, 2010 at 18:53

2 Answers 2

3
$\begingroup$

Have you thought about using simulate in the arm package? Gelman & Hill have some nice chapters on this in their book.

$\endgroup$
1
2
$\begingroup$

Yes, you are right. What boot does is that it just generates new training sets by drawing with replacement from the original set. So about 2/3 of the original objects are present in each of the new sets, still the size is the same, so it does not influence model building.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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