0

According to this there is a package called biostatUZH that contains the function tableRegression which enables to print the outputs of all kind of regression models in LaTeX format. However, where do the the p-value for the results from tableRegression come from?

R outcome

Surv(inf.time, infection) ~ Treatment + Gender + Race + Surface + 
    head + buttock + trunk + up.leg + low.leg + resp.tract

$coef
               Estimate          SE
lambda      0.004439542 0.005046457
alpha       0.889449031 0.109367187
Treatment  -0.642788917 0.312792437
Gender     -0.694909330 0.397259809
Race        2.107624809 1.015414175
Surface     0.003727016 0.009781626
head       -0.042867347 0.349149811
buttock     0.603633476 0.420309207
trunk       0.106228840 0.499189728
up.leg     -0.447043006 0.375005350
low.leg    -0.268656744 0.383194581
resp.tract -0.036052778 0.354124698

$HR
                  HR        LB         UB
Treatment  0.5258239 0.2848334  0.9707105
Gender     0.4991197 0.2291166  1.0873087
Race       8.2286734 1.1246249 60.2076862
Surface    1.0037340 0.9846740  1.0231628
head       0.9580385 0.4832658  1.8992398
buttock    1.8287515 0.8023925  4.1679503
trunk      1.1120763 0.4180455  2.9583235
up.leg     0.6395164 0.3066525  1.3336959
low.leg    0.7644056 0.3607016  1.6199428
resp.tract 0.9645894 0.4818490  1.9309631

$ETR
                  ETR          LB        UB
Treatment  2.05995086 1.008701792 4.2067909
Gender     2.18426779 0.904581822 5.2742888
Race       0.09351956 0.009458294 0.9246813
Surface    0.99581851 0.974525144 1.0175771
head       1.04937568 0.485964754 2.2659860
buttock    0.50729632 0.199485037 1.2900695
trunk      0.88742419 0.294492725 2.6741635
up.leg     1.65302453 0.721770127 3.7858177
low.leg    1.35262683 0.582154804 3.1428055
resp.tract 1.04136654 0.477522954 2.2709783

$summary

Call:
survreg(formula = formula, data = data, dist = "weibull")
               Value Std. Error      z        p
(Intercept)  6.09052      1.289  4.724 2.31e-06
Treatment    0.72268      0.364  1.984 4.73e-02
Gender       0.78128      0.450  1.737 8.24e-02
Race        -2.36958      1.169 -2.027 4.27e-02
Surface     -0.00419      0.011 -0.380 7.04e-01
head         0.04820      0.393  0.123 9.02e-01
buttock     -0.67866      0.476 -1.425 1.54e-01
trunk       -0.11943      0.563 -0.212 8.32e-01
up.leg       0.50261      0.423  1.189 2.35e-01
low.leg      0.30205      0.430  0.702 4.83e-01
resp.tract   0.04053      0.398  0.102 9.19e-01
Log(scale)   0.11715      0.123  0.953 3.41e-01

LaTeX:

> tableRegression(fit_weibull)
% latex table generated in R 3.4.4 by xtable 1.8-2 package
% Sun Jun 10 10:24:21 2018
\begin{table}[!h]
\centering
\begingroup\footnotesize
\begin{tabular}{rrrr}
  \hline
 & Hazard Ratio & 95\%-confidence interval & $p$-value \\ 
  \hline
Treatment & 0.53 & from 0.28 to 0.97 & 0.04 \\ 
  Gender & 0.50 & from 0.23 to 1.09 & 0.08 \\ 
  Race & 8.23 & from 1.12 to 60.21 & 0.038 \\ 
  Surface & 1.00 & from 0.98 to 1.02 & 0.70 \\ 
  head & 0.96 & from 0.48 to 1.90 & 0.90 \\ 
  buttock & 1.83 & from 0.80 to 4.17 & 0.15 \\ 
  trunk & 1.11 & from 0.42 to 2.96 & 0.83 \\ 
  up.leg & 0.64 & from 0.31 to 1.33 & 0.23 \\ 
  low.leg & 0.76 & from 0.36 to 1.62 & 0.48 \\ 
  resp.tract & 0.96 & from 0.48 to 1.93 & 0.92 \\ 
   \hline
\end{tabular}
\endgroup
\end{table}

Any ideas how can this be fixed? Or another way how I can print a WeibullReg output in LaTeX format? How were the p-value calculated in tableRegression?

user1607
  • 531
  • 7
  • 28

0 Answers0