Displaying 20 results from an estimated 192 matches for "glht".
2011 Mar 01
1
glht() used with coxph()
Hi, I am experimenting with using glht() from multcomp package together with
coxph(), and glad to find that glht() can work on coph object, for example:
> (fit<-coxph(Surv(stop, status>0)~treatment,bladder1))
coxph(formula = Surv(stop, status > 0) ~ treatment, data = bladder1)
coef exp(coef) se(coef...
2012 Jan 02
1
Is using glht with "Tukey" for lme post-hoc comparisons an appropriate substitute to TukeyHSD?
...c
comparisons on my lme model. I had originally planned to use Tukey
HSD method as I am interested in all possible comparisons between my
treatment levels. TukeyHSD, however, does not work with lme. The
only other code that I was able to find, and which also seems to be
widely used, is glht specified with Tukey:
summary(glht(model, linfct=mcp(Treatment="Tukey")))
Out of curiosity, I ran TukeyHSD and the glht code for a simple ANOVA
and found that they had quite different p-values. If the glht code is
not running TukeyHSD, what does the "Tukey" in the code sp...
2013 Oct 12
1
export glht to LaTeX
Hi,
I want to export the result of glht in R into a LaTeX table, such as that result:
Linear Hypotheses:
Estimate Std. Error z value Pr(>|z|)
Group1 - Group2 == 0 -0.14007 0.01589 -8.813 <0.001 "***"
Group1 - Group3 == 0 -0.09396 0.01575 -5.965 <0.00...
2008 Jan 10
1
general linear hypothesis glht() to work with lme()
Hi,
I am trying to test some contrasts, using glht() in
multcomp package on fixed effects in a linear mixed
model fitted with lme() in nlme package. The command I
used is:
## a simple randomized block design,
## type is fixed effect
## batch is random effect
## model with interaction
dat.lme<-lme(info.index~type, random=~1|batch/ty...
2013 Jul 25
1
lme (weights) and glht
Dear R members,
I tried to fit an lme model and to use the glht function of multcomp.
However, the glht function gives me some errors when using
weights=varPower().
The glht error makes sense as glht needs factor levels and the model
works fine without weights=. Does anyone know a solution so I do not
have to change the lme model?
Thanks
Sibylle
-->...
2008 Jan 11
1
glht() and contrast() comparison
Hi, I have been trying glht() from multcomp package
and contrast() from contrast package to test a
contrast that I am interested in.
With the following simulated dataset (fixed effect
"type" with 3 levels (b, m, t), and random effect
"batch" of 4 levels, a randomized block design with
interaction), somet...
2011 Mar 04
2
glht: Problem with symbolic contrast for factors with number-levels
Using a factor with 'number' levels the straightforward
symbolic formulation of a contrast in 'glht' of
the 'multcomp' package fails.
How can this problem be resolved without having to redefine the factor levels?
Example:
#A is a factor with 'number' levels
#B similar factor with 'letter' levels
dat<-data.frame(y=1:4,A=factor(c(1,1,2,2)),
B=...
2011 Jul 26
3
a question about glht function
Hi all:
There's a question about glht function.
My data:data_ori,which inclue CD4, GROUP,time.
f_GROUP<-factor(data_ori$GROUP)
f_GROUP is a factor of 3 levels(0,1,2,3)
result <- lme(sqrt(CD4) ~ f_GROUP*time ,random = ~time|ID,data=data_ori)
glht(result, linfct = mcp(f_GROUP="Tukey") )
Error in `[.data.frame`(mf,...
2008 Apr 15
2
glht with a glm using a Gamma distribution
Quick question about the usage of glht. I'm working with a data set
from an experiment where the response is bounded at 0 whose variance
increases with the mean, and is continuous. A Gamma error
distribution with a log link seemed like the logical choice, and so
I've modeled it as such.
However, when I use glht to lo...
2009 Mar 22
1
Multiple Comparisons for (multicomp - glht) for glm negative binomial (glm.nb)
...data is over dispersed so I have fitted a negative binomial glm
(glm.nb) and simplified using stepAIC from the MASS package etc.
There are significant differences in the number of insects attracted to
the different chemical (semio) and to the two different CO2 (release
rates) I have then used the glht function from the multcomp package to
do multiple comparisons to see what the specific differences between the
levels are for semio and CO2 using the code below which works great but
what I would like to do is to do comparisons combining the factors e.g a
comparison for semioA at CO at level 1 vs S...
2011 Aug 06
1
multcomp::glht() doesn't work for an incomplete factorial using aov()?
...789695.n4.nabble.com/How-set-lm-to-don-t-return-NA-in-summary-td3722587.html).
If I use aov() instead of lm() I get no NA in model estimates and I use
gmodels::estimable() without problems. Ok!
Now I'm performing a lot of contrasts and I need correcting for
multiplicity. So, I can use multcomp::glht() for this. However, glht()
return an error message that is not compatible with my expectations. Someone
know I or has a suggestion for? Below some reproducible code.
# toy data
adi <- expand.grid(cult=gl(1,3,la=LETTERS[1]), fert=101)
fat <- expand.grid(cult=gl(2,3,la=LETTERS[2:3]), fert=seq...
2012 Dec 05
1
Using multcomp::glht() with Anova object
...", "ma", "ra", "lp", "mp", "rp"), 3 ) )
library(car)
model.Anova <- Anova( lm(eeg ~ 1), idata=data.frame(Condition, Region),
idesign=~Condition*Region ) )
I'm now trying to do post-hoc comparisons between all levels of Condition
using glht() from the multcomp package. I do this using the way that has
worked for me with lmer() objects in the past: set up a contrast matrix and
then feed it to glht():
designmatrix <- matrix(0, nrow=3, ncol=18)
rownames(designmatrix) <- c("Cond1_minus_Cond2", "Cond3_minus_Cond1"...
2012 Mar 28
1
discrepancy between paired t test and glht on lme models
Hi folks,
I am working with repeated measures data and I ran into issues where the
paired t-test results did not match those obtained by employing glht()
contrasts on a lme model. While the lme model itself appears to be fine,
there seems to be some discrepancy with using glht() on the lme model
(unless I am missing something here). I was wondering if someone could
help identify the issue. On my actual dataset the differences between
glht() and...
2012 Jan 11
2
problems with glht for ancova
...F value Pr(>F)
edadysexo 2 31.859 15.9294 803.9843 <2e-16 ***
log(lcc) 1 11.389 11.3887 574.8081 <2e-16 ***
edadysexo:log(lcc) 2 0.063 0.0317 1.6021 0.2025
Residuals 509 10.085 0.0198
Then, I tried to do a post-hoc using glht from multcomp package, but,
because the interaction it's not siginificant i did it just for the factor
> summary(glht(ancova, linfct=mcp(edadysexo="Tukey")))
Simultaneous Tests for General Linear Hypotheses
Multiple Comparisons of Means: Tukey Contrasts
Fit: aov(for...
2010 May 17
1
Query on linear mixed model
...;-subset(MyData,Attribute=="ChromaL")
tapply(data$value, list(Product=data$Product),
mean,
na.rm=TRUE)
model <- lme(value ~
Product+Time+Arm+Product*Arm+Product*Time+Product*Arm*Time,
random = ~1 | Subj,data =data)
summary(model)
x<-anova(model)
x
library(multcomp)
su<-summary(glht(model,linfct=mcp(Product="Tukey")))
##length(su)
##su[1:(length(su)-4)]
x11()
plot(summary(glht(model,linfct=mcp(Product="Tukey"))),cex.axis=0.6)
##For Each Product Comparison across All Time
Points.
data<-MyData
data<-subset(data,Product=="a")
tapply(data$valu...
2012 Feb 06
2
glht (multicomparisons) with a binomial response variable
...infected and
non infected)
> anova(mcrm3,test="Chisq")
Df Deviance Resid. Df Resid. Dev P(>|Chi|)
NULL 520 149.81
mes 3 16.86 517 132.94 0.0007551 ***
When I?m trying to do a post comparisons between factors i tried with glht
of multcomp package by Torsten Hothorn I use "Tukey" contrast, but d?dn't
get diferencies
> summary(glht(mcrm3,linfct=mcp(month="Tukey")))
Estimate Std. Error z value Pr(>|z|)
may - april == 0 -18.2470 1555.0564 -0.012 1.0000
june - april...
2018 Apr 24
0
TukeyHSD and glht differ for models with a covariate
I have a question about TukeyHSD and the glht function because I'm
getting different answers when a covariate is included in model for
ANCOVA.? I'm using the cabbages dataset in the 'MASS' package for
repeatability.? If I include HeadWt as a covariate, then I get different
answers when performing multiple comparisons using...
2011 Apr 22
1
post-hoc test (glht?) which takes treatment into account not just explanatory variable overall
Hi R helpers!
I have used a glht as a post-hoc test on an lmer with:
-2 treatments (A & B)
-1 categorical explanatory variable (song type)
-1 response variable (latency to respond)
I wanted to make comparisons between the categorical variables depending on treatment.
At the moment the glht simply returns comparisons of each...
2010 Jul 21
1
post hoc test for lme using glht ?
...data set I've been attempting
to analyze using the lme function in the nlme package. Repeated searches
here and other places lead me to believe I have specified my model
correctly.
However, I am having trouble with post-hoc tests. From what I gather, other
people are successfully using the glht function from the multcomp package to
perform post-hoc tests. I've tried multiple iterations, but can't seem to
get it to work. Here is (a subset of) what I have been trying. Any help
would be greatly appreciated:
> model.3<-lme(fixed=Totnum~Wk*Pop, random=~1|nUID, data=nona)
#Wk...
2007 May 21
2
more simplified output from glht object
Hi,
I use glht to make multcomp, using Tukey, from a glm model.
It is possible to get a more simplified output of result? Somethink like
ordering by letters.
Thanks
Ronaldo
--
Human kind cannot bear very much reality.
-- T. S. Eliot, "Four Quartets: Burnt Norton"
--
> Prof. Ronaldo Reis J?nior...