Description Usage Arguments Value Note Author(s) See Also Examples
Generates a LaTex contrast table for the lme
, glm
and
lm
models, with number of significant digits shown depending on
standard deviation of the contrasts. Signficant p-values can be shaded.
1 2 3 4 |
object |
result of a fit by |
title |
printed in top left corner |
parameter |
label of the estimated parameter, used for caption and
label of the table. Can have spaces. Defaults to target variable in formula.
See also |
file |
output file name; default prints output to the standard output, which is the method of choice for Sweave. |
shadep |
table cells for p-values lower than this will be shaded;
p-values for |
caption |
caption used for table; default caption is ANOVA for <parameter> |
label |
label used for table; default label is composed from model formula by lmeLabel |
ctable |
uses |
form |
Optional formula for caption display. By default, object model formula is used |
interceptp |
If TRUE, show p-value and t-value of |
moredec |
Show more decimals than by default. Fractional values, e.g. 0.5 can be used here such that boundary case are rounded up instead of down |
where |
positioning parameter for LaTeX |
... |
Additional parameters passed to |
Returns the result of the call to latex
in Hmisc
.
Requires ctable
, colortable
in your Snw/tex file.
Dieter Menne, dieter.menne@menne-biomed.de
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # Pinheiro/Bates page 47
library(nlme)
library(Hmisc)
fm1Oats <- lme(yield~ordered(nitro)*Variety, data=Oats,
random = ~1|Block/Variety)
# Both versions give same result, output to console
latex(fm1Oats,"Yield")
latex(summary(fm1Oats),"Yield")
# The following model is nonsense, but it shows how default latex labels
# and captions are constructed in complex cases
fm2Oats <- lme(yield~I(sqrt(nitro))*Variety + I(nitro^2), data=Oats,
random = ~1|Block/Variety)
latex(fm2Oats,"Yield with dumb model")
# For lm
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
sex <- as.factor(rep(c("f","m"),10))
group <- gl(2,10,20, labels=c("Ctl","Trt"))
weight <- c(ctl, trt)
x <- lm(weight ~ group*sex)
latex(x,parameter="Weight",moredec=0.5)
# For glm
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
d.AD <- data.frame(treatment, outcome, counts)
glm.D <- glm(counts ~ outcome + treatment, family=poisson())
latex(glm.D,parameter="severe")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.