Displaying 20 results from an estimated 300 matches similar to: "lme, glmmPQL, multiple random effects"
2005 Dec 09
1
lmer for 3-way random anova
I have been using lme from nlme to do a 3-way anova with all the effects treated as random. I was wondering if someone could direct me to an example of how to do this using lmer from lme4.
I have 3 main effects, tim, trt, ctr, and all the interaction effects tim*trt*ctr. The response variable is ge.
Here is my lme code:
dat <-
2007 May 25
0
Help with complex lme model fit
Hi R helpers,
I'm trying to fit a rather complex model to some simulated data using
lme and am not getting the correct results. It seems there might be
some
identifiability issues that could possibly be dealt with by
specifying
starting parameters - but I can't see how to do this. I'm comparing
results from R to those got when using GenStat...
The raw data are available on the
2005 Feb 08
0
2: lme4 ---> GLMM
Douglas Bates wrote:
>
> The GLMM function in the lme4 package allows you to specify crossed
> random effects within the random argument without the need for the
> pdBlocked and pdIdent constructions. Simply ensure that your grouping
> factors are defined in such a way that each distinct group has a
> different level in the grouping factor (this is usually not a problem
2003 Sep 25
0
mixing nested and crossed factors using lme
Hi all,
I have an experiment where 5 raters assessed the quality of 24 web sites. (each rater rated each site once). I want to come up with a measure of reliability of the ratings for the web sites ie to what extent does each rater give the same (or similar) rating to each web site. My idea was to fit a random effects model using lme and from that, calculate the intraclass correlation as a
2003 Jul 01
1
crossed random effects
Hi,
I have a data set on germination and plant growth with
the following variables:
dataset=fm
mass (response)
sub (fixed effect)
moist (fixed effect)
pop (fixed effect)
mum (random effect nested within population)
iheight (covariate)
plot (random effect- whole plot factor for split-plot
design).
I want to see if moist or sub interacts with mum for
any of the pops, but I am getting an error
2006 Feb 07
0
lme and Assay data: Test for block effect when block is systematic - anova/summary goes wrong
Consider the Assay data where block, sample within block and dilut within block is random.
This model can be fitted with (where I define Assay2 to get an ordinary data frame rather
than a grouped data object):
Assay2 <- as.data.frame(Assay)
fm2<-lme(logDens~sample*dilut, data=Assay2,
random=list(Block = pdBlocked(list(pdIdent(~1), pdIdent(~sample-1),pdIdent(~dilut-1))) ))
Now, block
2008 Aug 25
1
aov, lme, multcomp
I am doing an analysis and would like to use lme() and the multcomp
package to do multiple comparisons. My design is a within subjects
design with three crossed fixed factors (every participant sees every
combination of three fixed factors A,B,C). Of course, I can use aov() to
analyze this with an error term (leaving out the obvious bits):
y ~ A*B*C+Error(Subject/(A*B*C))
I'd also like
2003 May 12
1
update.lme trouble (PR#2985)
Try this
data(Assay)
as1 <- lme(logDens~sample*dilut, data=Assay,
random=pdBlocked(list(
pdIdent(~1),
pdIdent(~sample-1),
pdIdent(~dilut-1))))
update(as1,random=pdCompSymm(~sample-1))
update(as1,random=pdCompSymm(~sample-1))
update(as1,random=pdCompSymm(~sample-1))
update(as1,random=pdCompSymm(~sample-1))
I'm
2006 Apr 20
1
A question about nlme
Hello,
I have used nlme to fit a model, the R syntax is like
fmla0<-as.formula(paste("~",paste(colnames(ldata[,9:13]),collapse="+"),"-1"))
> fmla1<-as.formula(paste("~",paste(colnames(ldata[,14:18]),collapse="+"),"-1"))
>
2005 Feb 17
0
lme4--->GLMM
Hello,
I'm very sorry for my repeated question, which i asked 2 weeks ago, namely:
i'm interested in possibly simple random-part specification in the call
of GLMM(...) (from lme4-package)
i have a random blocked structure (i.e. ~var.a1+var.a2+var.a3,
~var.b1+var.b2,~var.c1+var.c2+var.c3+var.c4),
and each one part of it i would like to model as Identity-structure
matrix. So i had,
2005 Dec 27
2
glmmPQL and variance structure
Dear listers,
glmmPQL (package MASS) is given to work by repeated call to lme. In the
classical outputs glmmPQL the Variance Structure is given as " fixed
weights, Formula: ~invwt". The script shows that the function
varFixed() is used, though the place where 'invwt' is defined remains
unclear to me. I wonder if there is an easy way to specify another
variance
2005 Feb 08
2
lme4 --> GLMM
hello!
this is a question, how can i specify the random part in the GLMM-call
(of the lme4 library) for compound matrices just in the the same way as
they defined in the lme-Call (of the nlme library). For example
i would just need
random=list(my.Subject=pdBlocked(list(pdIdent(~... , ...),pdIdent(~... ,
...))))
this specification , if i also attach library(nlme) , is not
2005 Feb 08
2
lme4 --> GLMM
hello!
this is a question, how can i specify the random part in the GLMM-call
(of the lme4 library) for compound matrices just in the the same way as
they defined in the lme-Call (of the nlme library). For example
i would just need
random=list(my.Subject=pdBlocked(list(pdIdent(~... , ...),pdIdent(~... ,
...))))
this specification , if i also attach library(nlme) , is not
2004 Feb 16
1
nlme_crossed AND nested random effects
Dear R-help group,
How can I define a lme with 3 factors(a,b,c), where c is nested in b,
and a is crossed with b/c?
I think that:
lme(response ~ ..., data = Data,
random = pdBlocked(list(pdIdent(~ a - 1), pdIdent(~ b - 1))))
is one part of the answer and:
lme(response~..., data=Data, random=~1|b/c)
is the other part of the answer but how can I combine them??
Could anybody please help
2010 Oct 18
1
Crossed random effects in lme
Dear all,
I am trying to fit a model with crossed random effects using lme. In this
experiment, I have been measuring oxygen consumption (mlmin) in bird
nestlings, originating from three different treatments (treat), in a
respirometer with 7 different channels (ch). I have also measured body mass
(mass) for these birds.
id nest treat year mlmin mass ch hack
1EP51711 17
2002 Jan 25
0
nested versus crossed random effects
Hi all,
I'm trying to test a repeated measures model with random effects using the
nlme library. Suppose I have two within subjects factors A, B both with
two levels. Using aov I can do:
aov.1 <- aov(y ~ A*B + Error(S/(A+B))
following Pinheiro and Bates I can acheive the analagous mixed-effects
model with:
lme.1 <- lme(y~A*B, random=pdBlocked(list(pdIdent(~1),pdIdent(~A-1),
2004 Apr 11
1
converting lme commands from S-PLUS to R
I'm trying to do some smoothing with lme and am having some difficulty
bringing commands over from S-PLUS to R. I have the following setup
(modified from Ngo and Wand, 2004):
set.seed(1)
x <- runif(200)
y <- sin(3*pi*x) + rnorm(200)*.4
## library(splines)
z <- ns(x, 4)
The following runs without error on S-PLUS
f <- lme(y ~ 1, random = pdIdent(~ -1 + z))
But in R I get
2011 Jan 21
1
TRADUCING lmer() syntax into lme()
---------- Forwarded message ----------
From: Freddy Gamma <freddy.gamma@gmail.com>
Date: 2011/1/21
Subject: TRADUCING lmer() syntax into lme()
To: r-sig-mixed-models@r-project.org
Dear Rsociety,
I'd like to kingly ask to anyone is willing to answer me how to implement a
NON NESTED random effects structure in lme()
In particular I've tried the following translation from lmer to
2011 Oct 09
2
pdIdent in smoothing regression model
Hi there,
I am reading the 2004 paper "Smoothing with mixed model software" in
Journal of Statistical Software, by Ngo and Wand. I tried to run
their first example in Section 2.1 using R but I had some problems.
Here is the code:
library(nlme)
fossil <- read.table("fossil.dat",header=T)
x <- fossil$age
y <- 100000*fossil$strontium.ratio
knots <-
2004 Aug 04
1
cross random effects
Dear friends,
I have asked last few days about cross-random effects
using PQL, but I have not receive any answer because
might my question was not clear.
My question was about analysing the salamander mating
data using PQL. This data contain cross-random effects
for (male) and for (female). By opining MASS and lme
library. I wrote this code
sala.glmm <- glmmPQL(fixed=y~WSf*WSM,