1
$\begingroup$

When estimating a glm model with caret, using the summary function the standard errors are printed out. However, I don't know how to extract these values. I can get the coefficient values with model[["finalModel"]][["coefficients"]], but not the standard errors.

This question is similar but its answer suggest bootstrap. If there is a way to get the standard errors in a direct way, it would be preferable.

$\endgroup$
3
$\begingroup$

A couple of approaches.

Either take them directly from the summary object:

coef(summary(model))[,2]

or calculate them from the covariance matrix:

sqrt(diag(vcov(model)))
$\endgroup$

Your Answer

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

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