title: Generalized Linear Model output through texreg
body: <p>I can use <code>texreg</code> to get beautiful output of glm to be used for <code>knitr</code>. Sometimes we need to convert the output of glm back to response using inverse link. I wonder how to get inverse link output with <code>texreg</code>. Something like <code>texreg(exp(glm.D93))</code>. </p>
  
  <pre><code>counts &lt;- c(18,17,15,20,10,20,25,13,12)
  outcome &lt;- gl(3,1,9)
  treatment &lt;- gl(3,3)
  d.AD &lt;- data.frame(treatment, outcome, counts)
  glm.D93 &lt;- glm(counts ~ outcome + treatment, family = poisson())
  
  library(texreg)
  texreg(glm.D93)
  </code></pre>
  
  <p>which produces</p>
  
  <pre><code>\begin{table}
  \begin{center}
  \begin{tabular}{l c }
  \hline
                 &amp; Model 1 \\
  \hline
  (Intercept)    &amp; $3.04^{***}$ \\
                 &amp; $(0.17)$     \\
  outcome2       &amp; $-0.45^{*}$  \\
                 &amp; $(0.20)$     \\
  outcome3       &amp; $-0.29$      \\
                 &amp; $(0.19)$     \\
  treatment2     &amp; $0.00$       \\
                 &amp; $(0.20)$     \\
  treatment3     &amp; $0.00$       \\
                 &amp; $(0.20)$     \\
  \hline
  AIC            &amp; 56.76        \\
  BIC            &amp; 57.75        \\
  Log Likelihood &amp; -23.38       \\
  Deviance       &amp; 5.13         \\
  Num. obs.      &amp; 9            \\
  \hline
  \multicolumn{2}{l}{\scriptsize{$^{***}p&lt;0.001$, $^{**}p&lt;0.01$, $^*p&lt;0.05$}}
  \end{tabular}
  \caption{Statistical models}
  \label{table:coefficients}
  \end{center}
  \end{table}
  </code></pre>
  
  <p>But <code>texreg(exp(glm.D93))</code> say </p>
  
  <pre><code>Error in exp(glm.D93) : non-numeric argument to mathematical function
  </code></pre>
  
  <p><strong>Edited</strong></p>
  
  <p><code>glm</code> uses some <code>link</code> function and provides the <strong>coefficients</strong>, <strong>standard errors</strong> and <strong>confidence intervals</strong> on <strong>link scale</strong>. But sometimes we also need <strong>coefficients</strong>, <strong>standard errors</strong> and <strong>confidence intervals</strong> on the <strong>response scale</strong>.  <code>texreg</code> directly provides <strong>coefficients</strong>, <strong>standard errors</strong> and <strong>confidence intervals</strong> on <strong>link scale</strong>, I wonder if it is possible to get <strong>coefficients</strong>, <strong>standard errors</strong> and <strong>confidence intervals</strong> on <strong>response scale</strong> directly.</p>
  
  <p>I found a way to do this with <code>stargazer</code> but still the standard errors and confidence intervals are not the correct one. Looking the solution to this one.</p>
  
  <pre><code>library(stargazer)
  
  stargazer(glm.D93, coef=list(exp(glm.D93$coefficients)), type="text")
  
  =============================================
                        Dependent variable:    
                    ---------------------------
                              counts           
  ---------------------------------------------
  outcome2                   0.635***          
                              (0.202)          
  
  outcome3                   0.746***          
                              (0.193)          
  
  treatment2                 1.000***          
                              (0.200)          
  
  treatment3                 1.000***          
                              (0.200)          
  
  Constant                   21.000***         
                              (0.171)          
  
  ---------------------------------------------
  Observations                   9             
  Log Likelihood              -23.381          
  Akaike Inf. Crit.           56.761           
  =============================================
  Note:             *p&lt;0.1; **p&lt;0.05; ***p&lt;0.01
  </code></pre>