feodor at stat.ku.dk wrote:> Full_Name: Soren Feodor Nielsen
> Version: 2.5.0
> OS: linux-gnu
> Submission from: (NULL) (130.225.103.21)
>
>
> The print-out of xtable in the following example is wrong; instead of
yielding
> the correct ci's for the second model it repeats the ci's from the
first model.
>
>
> require(xtable)
> require(MASS)
> data(cats)
> b1<-lm(Hwt~Sex,cats)
> b2<-lm(Hwt~Sex+Bwt,cats)
> cbind(c(coef(b1),NA),rbind(confint(b1),c(NA,NA)),coef(b2),confint(b2))
>
xtable(cbind(c(coef(b1),NA),rbind(confint(b1),c(NA,NA)),coef(b2),confint(b2)))
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
Not for me with a current(!) version of R et al.:
> cbind(c(coef(b1),NA),rbind(confint(b1),c(NA,NA)),coef(b2),confint(b2))
2.5 % 97.5 % 2.5 % 97.5 %
(Intercept) 9.202128 8.559519 9.844736 -0.41495263 -1.8528230 1.022918
SexM 2.120553 1.337588 2.903517 -0.08209684 -0.6831776 0.518984
NA NA NA 4.07576892 3.4929923
4.658546>
xtable(cbind(c(coef(b1),NA),rbind(confint(b1),c(NA,NA)),coef(b2),confint(b2)))
% latex table generated in R 2.6.1 by xtable 1.5-2 package
% Mon Jan 7 15:38:21 2008
\begin{table}[ht]
\begin{center}
\begin{tabular}{rrrrrrr}
\hline
& V1 & 2.5 \% & 97.5 \% & V4 & 2.5 \% & 97.5 \% \\
\hline
(Intercept) & 9.20 & 8.56 & 9.84 & $-$0.41 & $-$1.85 &
1.02 \\
SexM & 2.12 & 1.34 & 2.90 & $-$0.08 & $-$0.68 & 0.52
\\
& & & & 4.08 & 3.49 & 4.66 \\
\hline
\end{tabular}
\end{center}
\end{table}
--
O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907