Description Usage Arguments Value Author(s) See Also Examples
Reads contrast from an Excel file for use with estimable
of package gmodels.
1 2 3 | getContrasts(cname, excelfile, rows = NULL)
readContrasts(cname, excelfile)
|
cname |
Sheet name in Excel file |
excelfile |
path of Excel file with contrast table |
rows |
optionally only select some rows of the table |
readContrasts
read a contrast table. Only columns with at
least on period in the header are kept.
getContrasts
additionally includes column and row name
information to label contrast tables with estimable (gmodels)
Dieter Menne, dieter.menne@menne-biomed.de
See constrast.xlsx
in the extdata directory for some
rules of thumb on constructing a contrast matrix.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(nlme)
library(gmodels)
options(digits=3)
set.seed(4711)
excelfile = system.file("extdata", "contrasts.xlsx", package = "Dmisc2")
d = expand.grid(subject = LETTERS[1:8],
peri= c("Wine", "Tea"),
post = c("Water", "Kirsch"),
interval = c("Pre", "Post"))
d$vol = round(rnorm(nrow(d),10,2),1)
d.lme = lme(vol~interval+peri+post+peri:interval+interval:post,
data=d,random=~1|subject)
summary(d.lme)
ct = getContrasts("peripostinterval",excelfile)
estimable(d.lme,ct,conf.int=0.95)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.