Displaying 20 results from an estimated 700 matches similar to: "Using multcomp::glht() with Anova object"
2013 Feb 13
2
e1071::skewness and psych::skew return NaN
Hello everyone,
Does anyone know what would cause the skewness() function (from
e1071), as well as skew() from psych, to return a value of NaN?
I have a vector of positively-skewed data
(https://docs.google.com/file/d/0B6-m45Jvl3ZmYzlHRVRHRURzbVk/edit?usp=sharing)
which these functions return a value for like normal:
> skewness( data ) # returns 1.400405
but when I instead give those
2012 Dec 05
1
duplicated() with long vectors
Hello,
duplicated() does not seem to work for a long vector. For example, if
you download the data from
https://docs.google.com/open?id=0B6-m45Jvl3ZmNmpaSlJWMXo5bmc (a vector
with about 12,000 numbers) and then run the following code which does
duplicated() over the whole vector but just shows the last 30
elements:
data.frame( tail(verylong, 30), tail(duplicated(verylong), 30) )
you'll see
2012 Jan 13
1
GLHT in multcomp: Two similar models, one doesn't work
i ran this model
> model2<-glm(rojos~ageandsex+sector+season+sector:season,quasipoisson)
> glht(model2,linfct=mcp(ageandsex="Tukey"))
General Linear Hypotheses
Multiple Comparisons of Means: Tukey Contrasts
Linear Hypotheses:
Estimate
M - H == 0 0.2898
SUB - H == 0 -0.2261
SUB - M == 0 -0.5159
I tried to do the same changing factor season
2012 Nov 24
1
Adding a new variable to each element of a list
Hello,
I have a list of data with multiple elements, and each element in the list
has multiple variables in it. Here's an example:
### Make the fake data
dv <- c(1,3,4,2,2,3,2,5,6,3,4,4,3,5,6)
subject <- factor(c("s1","s1","s1","s2","s2","s2","s3","s3","s3",
2017 Mar 24
2
Error in documentation for ?legend
To whom it may concern:
The help page for ?legend refers to a `title.cex` parameter, which suggests that the function has such a parameter. As far as I can tell, though, it doesn't; here's an example:
> plot(1,1)
> legend("topright",pch=1, legend="something", title="my legend", title.cex=2)
Error in legend("topright", pch = 1, legend =
2017 Mar 25
2
Error in documentation for ?legend
Right, that's my point. The help page mentions a `title.cex`, like I said; saying that `cex` sets the default `title.cex` sure implies to me (and presumably to the other people whose discussion I linked) that a `title.cex` parameter exists. Since no such parameter exists, this bit in the documentation is misleading (suggesting that there is a `title.cex` parameter which can be set, when there
2012 Sep 07
2
Contrasts for 2x4 interaction in mixed effects model
Hello everyone,
I am running a mixed effects model where I have two fixed factors, one with
2 levels and one with 4, and their interaction. Let's say these are my
factors and their levels:
FirstFactor: 1, 2
SecondFactor: A, B, C, D
For the interaction, I am interested in the four two-way comparisons, not
the two four-way comparisons. In other words, I want to test whether 1A is
2012 Sep 12
1
Contrasts in mixed effects model: difference between differences
Hello everyone,
I am testing a model in which I have a two-level factor (let's call it
First [1, 2]) nested under a four-level factor (let's call it Second [A, B,
C, D]). I have used the following model to get coefficients representing
whether, for each level of Second, there is a significant difference (in
the outcome variable, Latency) between the levels of First:
test <- lmer(
2013 Jan 10
0
Questions about the glht function for planned comparison
Hi all,
I've posted this question before, but did not get any reply. I post it
again here and see if anybody can help. Thank you.
I have a nested model with the following effects
fixed: treatments
random: experiment_date
I used lme() to model the data
mod1 <- lme(N_cells ~treatments-1, random=~1|experiment_date, method='ML')
Then I want to compare all the other
2012 Nov 19
0
glht function in multcomp gives unexpected p=1 for all comparisons
Hi, I have data with binomial response variable (survival) and 2 categorical independent variables (site and treatment) (see below).? I have run a binomial GLM and found that both IVs and the interaction are significant.? Now I want to do a post-hoc test for all pairwise comparisons to see which treatment groups differ.? I tried the glht function in the multcomp package, but I get surprising
2010 May 30
1
How to use the function "glht" of multcomp package to test interaction?
It's been a few weeks I'm racking my brains on how to use the function glht
the package multcomp to test interactions. Unfortunately, the creator of the
package forgot to put a sample in pdf package how to do it. I have looked in
several places, but found nothing. If someone for the love of God can help
me I'll be extremely grateful. The model is glm.
--
View this message in context:
2011 Sep 05
0
glht (multcomp): NA's for confidence intervals using univariate_calpha (fwd)
fixed @ R-forge. New version should appear on CRAN soon.
Thanks for the report!
Torsten
>
> ---------- Forwarded message ----------
> Date: Sat, 3 Sep 2011 23:56:35 +0200
> From: Ulrich Halekoh <Ulrich.Halekoh at agrsci.dk>
> To: "r-help at r-project.org" <r-help at r-project.org>
> Subject: [R] glht (multcomp): NA's for confidence intervals using
2011 Feb 08
0
glht{multcomp} : use with lme {nlme}
Hi dears,
I do
> CHOL<-lme(chol~rt*cd4+sex+age+rf+nadir+pharmac+factor(hcv)+factor(hbs)+
haartd+hivdur+factor(arv),
random= ~rt|id, na.action=na.omit)
...runs sweet,..then
....try a multicomparisons approach for the categorical rf
> summary(glht(CHOL, linfct=mcp(rf="Tukey")))
*
Error in model.frame.default(object, data, xlev = xlev) :
l'oggetto non รจ una matrice
2007 Nov 21
1
multiple comparison (glht) problem
I am not sure whether there is a bug. When I tested the example given for "glht"
in the help, I entered the following error:
Running commands:
amod <- aov(minutes ~ blanket, data = recovery)
rht <- glht(amod, linfct = mcp(blanket = "Dunnett"),
alternative = "less")
Errors are:
Error in try(coef.(model)) : could not find function
2007 Jun 04
0
Error: could not find function "glht" (multcomp)
Dear List,
Could you tell why I get the error message?
> library(multcomp)
> data("cholesterol")
> m = aov(response ~ trt, data = cholesterol)
> cht <- glht(m, linfct = mcp(trt = "Tukey"))
Error: could not find function "glht"
Thank you
G?bor
2011 Sep 03
0
glht (multcomp): NA's for confidence intervals using univariate_calpha
Hej,
Calculation of confidence intervals for means
based on a model fitted with lmer
using the package multcomp
- yields results for calpha=adjusted_calpha
- NA's for calpha=univariate_calpha
Example:
library(lme4)
library(multcomp)
### Generate data
set.seed(8)
d<-expand.grid(treat=1:2,block=1:3)
e<-rnorm(3)
names(e)<-1:3
d$y<-rnorm(nrow(d)) + e[d$block]
2012 Nov 05
0
Diference in results from doBy::popMeans, multcomp::glht and contrast::contrast for a lme model
Hello R users,
I'm analyzing an experiment in a balanced incomplet block design (BIB). The
effect of blocks are assumed to be random, so I'm using nlme::lme for this.
I'm analysing another more complex experiments and I notice some diferences
from doBy::popMeans() compared multcomp::glht() and contrast::contrast().
In my example, glht() and contrast() were equal I suspect popMeans()
2009 Oct 27
0
syntax for estimable(gmodels package) and glht(multcomp package)
Hello,
I have a question as to how the syntax for glht(package multcomp) and
estimable (gmodels) works, since I'm not getting everything from the
documents I've googled so far, especially with models with 2nd order
terms.
A modestly complex model:
2-way anova with one continuous covariate, no random effects(and no
repeated measures) to keep it modestly complex:
Y = treatmentgroup + sex
2011 Aug 06
1
multcomp::glht() doesn't work for an incomplete factorial using aov()?
Hi R users,
I sent a message yesterday about NA in model estimates (
http://r.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.
2012 Dec 06
1
Fitting a multinomial model to a multi-way factorial design with repeated measures: help on package and syntax
Dear all,
I studied in tank prey fish behavior. Using the design described below
(and R code), I want to test the effects of both habitat and predator
(and interaction) on prey fish's vertical distribution, which was
recorded (with repeated measures) as a categorical variable.
I found that package mlogit might fit to my need but I don't know how to
specify my complex design in the