export cochrane.orcutt test from R to LaTex -
hi try export output of cochrane.orcutt test fro r latex. output looks this:
$cochrane.orcutt call: lm(formula = yb ~ xb - 1) residuals: min 1q median 3q max -0.010742 -0.003844 -0.000546 0.002324 0.037165 coefficients: estimate std. error t value pr(>|t|) xb(intercept) 0.0399230 0.0011903 33.542 <2e-16 *** xbl(media, 6) -0.0004572 0.0008494 -0.538 0.591 xbl(endog1, 0) 0.0558362 0.0016637 33.562 <2e-16 *** --- signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 residual standard error: 0.005789 on 230 degrees of freedom multiple r-squared: 0.9911, adjusted r-squared: 0.991 f-statistic: 8540 on 3 , 230 df, p-value: < 2.2e-16 $rho [1] 0.1608004 $number.interaction [1] 3
if try using tidy function broom, r sais : "no tidying method recognized list " can in case? thnx
try this:
library(xtable) xtable(reg2$cochrane.orcutt$coefficients) % latex table generated in r 3.2.5 xtable 1.8-2 package % wed apr 20 00:38:57 2016 \begin{table}[ht] \centering \begin{tabular}{rrrrr} \hline & estimate & std. error & t value & pr($>$$|$t$|$) \\ \hline xb(intercept) & 0.24 & 0.25 & 0.96 & 0.35 \\ xbprice & -1.19 & 0.69 & -1.74 & 0.10 \\ xbincome & 0.00 & 0.00 & 2.13 & 0.04 \\ xbtemp & 0.00 & 0.00 & 6.66 & 0.00 \\ \hline \end{tabular} \end{table}
Comments
Post a Comment