Displaying 20 results from an estimated 10000 matches similar to: "Specify correlation structure in lme4"
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
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
2006 Jun 30
1
lme and SAS Proc mixed
I am trying to use lme to fit a mixed effects model to get the same
results as when using the following SAS code:
proc mixed;
class refseqid probeid probeno end;
model expression=end logpgc / ddfm=satterth;
random probeno probeid / subject=refseqid type=cs;
lsmeans end / diff cl; run;
There are 3 genes (refseqid) which is the large grouping factor, with
2 probeids nested within each refseqid,
2005 Jul 13
1
crossed random fx nlme lme4
I need to specify a model similar to this
lme.formula(fixed = sqrt(lbPerAc) ~ y + season + y:season, data = cy,
random = ~y | observer/set, correlation = corARMA(q = 6))
except that observer and set are actually crossed instead of nested.
observer and set are factors
y and lbPerAc are numeric
If you know how to do it or have suggestions for reading I will be
grateful.
eal
ps I have
2010 Oct 01
1
Pass Arguments to R with an LSF submit
I'm trying to run R in batch mode on an LSF managed cluster. In simple
settings, I can do it just fine. The trouble I'm having is when I try to
pass arguments to the batch job. For example,
bsub R CMD BATCH --args 1 3 commandfile.R &
LSF doesn't like the &, and it doesn't run. I'm hoping one you can help me
submit a job to an LSF cluster that allows me to pass
2012 Nov 27
0
Variance component estimation in glmmPQL
Hi all,
I've been attempting to fit a logistic glmm using glmmPQL in order to
estimate variance components for a score test, where the model is of the
form logit(mu) = X*a+ Z1*b1 + Z2*b2. Z1 and Z2 are actually reduced rank
square root matrices of the assumed covariance structure (up to a constant)
of random effects c1 and c2, respectively, such that b1 ~ N(0,sig.1^2*I) and
c1 ~
2012 Dec 08
5
How to efficiently compare each row in a matrix with each row in another matrix?
Dear expeRts,
I have two matrices A and B. They have the same number of columns but possibly different number of rows. I would like to compare each row of A with each row of B and check whether all entries in a row of A are less than or equal to all entries in a row of B. Here is a minimal working example:
A <- rbind(matrix(1:4, ncol=2, byrow=TRUE), c(6, 2)) # (3, 2) matrix
B <-
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
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
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,
2003 Jun 17
1
lme() vs aov(y ~ A*B + Error(aa %in% A + bb %in% B)) [repost]
I've posted the following to R-help on May 15.
It has reproducible R code for real data -- and a real
(academic, i.e unpaid) consultion background.
I'd be glad for some insight here, mainly not for myself.
In the mean time, we've learned that it is to be expected for
anova(*, "marginal") to be contrast dependent, but still are
glad for advice if you have experience.
Thank
2005 May 25
4
mixed model
Hello all,
I have problem with setting up random effects.
I have a model:
y=x1+x2+x1*x2+z1+z1*x2
where x1, x2, x1*x2 are fixed effects
and z1, z1*x2 are random effects (crossed effects)
I use library(nlme) 'lme' function.
My question is: how I should set up random effects?
I did
lme(y~x1+x2+x1:x2, data=DATA, random=~z1+z1:x2, na.action='na.omit')
but it did not work.
2007 Jun 20
1
nlme correlated random effects
I am examining the following nlme model.
asymporig<-function(x,th1,th2)th1*(1-exp(-exp(th2)*x))
mod1<-nlme(fa20~(ah*habdiv+ad*log(d)+ads*ds+ads2*ds2+at*trout)+asymporig(da.p,th1,th2),
fixed=ah+ad+ads+ads2+at+th1+th2~1,
random=th1+th2~1,
start=c(ah=.9124,ad=.9252,ads=.5,ads2=-.1,at=-1,th1=2.842,th2=-6.917),
data=pca1.grouped)
However, the two random effects (th1 and th2)
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,
2012 Jan 23
2
model non-nested random effects in nlme library
Hello all,
In lme4 if you want to model two non-nested random effects you code it like
this:
mod1 <- lmer(y~x + (1|randomvar1) + (1|randomvar2))
How would you go about to model something similar in nlme?
In my database I have two variables for which I have repeated measures, lets
call them "individual" and "year".
But none of the "individuals" were measured in
2006 Jan 03
3
Package for multiple membership model?
Hello all:
I am interested in computing what the multilevel modeling literature calls a multiple membership model. More specifically, I am working with a data set involving clients and providers. The clients are the lower-level units who are nested within providers (higher-level). However, this is not nesting in the usual sense, as clients can belong to multple providers, which I understand
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 <-
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
2009 Sep 01
1
Syntax for crossed random effects in nlme
Hello R users,
I've read the posts on this topic, and had a look at the R documentation for
nlme, but I can't seem to make this work. I'd like to be able to fit a mixed
effects model with crossed random effects, but also be able to specify the
covariance matrix structure for the residuals. Here's the syntax using the
lmer function in lme4 (which doesn't currently allow