I am sure there is a way to do this but I am not sure how to show the variable names for my output along with my exponentiated results for a relative risk output for a project I am working on. Below includes some sample code. It is probably relatively easy, but I am not sure how to extract the variable name/factor level column so that it is side-by-side with the risk ratio outputs so that I do not have to look at the numbered rows from the prior output and compare with my exponentiated output. The first column isn't truly stored as a column, from what I can tell. Basically, for my output I want the first one to say "(Intercept) 0.24 (0.06-1.01)" and so on. Thanks!!!
> cov.m1 <- vcovHC(sexrr_modadj_mm, type = "HC0")
> std.err <- sqrt(diag(cov.m1))
> q.val <- qnorm(0.975)
> r.est <- cbind(
+ Estimate = coef(sexrr_modadj_mm)
+ , "Robust SE" = std.err
+ , z = (coef(sexrr_modadj_mm)/std.err)
+ , "Pr(>|z|) "= 2 * pnorm(abs(coef(sexrr_modadj_mm)/std.err), lower.tail = FALSE)
+ , LL = coef(sexrr_modadj_mm) - q.val * std.err
+ , UL = coef(sexrr_modadj_mm) + q.val * std.err
+ )
> r.est
Estimate Robust SE z Pr(>|z|) LL
(Intercept) -1.430923e+00 0.7337880617 -1.95004986 5.117018e-02 -2.869121e+00
PrimaryAnesthesiaTypeGeneral 5.283219e-02 0.5460422343 0.09675477 9.229211e-01 -1.017391e+00
PrimaryAnesthesiaTypeMonitor Anesthesia Care 1.874183e+00 0.9023864714 2.07691834 3.780910e-02 1.055380e-01
PrimaryAnesthesiaTypeNeuraxial Nerve Block -2.096085e+00 1.1418850877 -1.83563536 6.641160e-02 -4.334138e+00
PrimaryAnesthesiaTypePeripheral Nerve Block -1.315466e+01 0.6931926700 -18.97691303 2.646985e-80 -1.451329e+01
PrimaryAnesthesiaTypeRegional -7.875437e-02 0.4793121244 -0.16430706 8.694894e-01 -1.018189e+00
PrimaryBlockEpidural 2.211594e-01 0.1356256444 1.63066036 1.029620e-01 -4.466202e-02
> paste(round(exp(r.est[,1]), digits = 2), " (", round(exp(r.est[,5]), digits = 2), "-", round(exp(r.est[,6]), digits = 2), ")", sep = "")
[1] "0.24 (0.06-1.01)" "1.05 (0.36-3.07)" "6.52 (1.11-38.2)" "0.12 (0.01-1.15)" "0 (0-0)"
[6] "0.92 (0.36-2.36)" "1.25 (0.96-1.63)" "0 (0-0)" "0 (0-0)" "0 (0-0)"