similar to: Specify correlation structure in lme4

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
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.
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 <-
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 ~
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
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
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,
2004 Feb 05
1
Multilevel in R
Hello, I have difficulties to deal with multilevel model. My dataset is composed of 10910 observations, 1237 plants nested within 17 stations. The data set is not balanced. Response variable is binary and repeated. I tried to fit this model model<- glmmPQL( y ~ z1.lon*lun + z2.lat*lun + z1.lon*lar + z2.lat*lar + z1.lon*sca + z2.lat*sca +z1.lon*eta + z2.lat*eta, random = ~ lun + lar + sca
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
2003 Feb 11
1
mean function on correlation matrices (PR#2540)
Full_Name: Raymond Salvador Version: R 1.6.2 OS: Windows ME Submission from: (NULL) (131.111.93.195) The mean function applied on individual components of several correlation matrices gives a wrong result (gives the first value instead of the mean). Here there is a simple example x1 <- rnorm(10,1,1) y1 <- rnorm(10,1,1) z1 <- cbind(x1,y1) w1 <- cor(z1) x2 <- rnorm(10,1,1) y2
2009 Jun 03
1
Function in R for computing correlation matrix and covariance matrix
Hi, At present, i have two distinct and real values for the coefficient, which is  required in AR(2) model. Based on my revision, for distinct and real values of the coefficients in AR(2) model, the correlation structure separated by lag h can be computed by p(h) = a*z1^(-h) + b*z2^(h), where p(h) is the autocorrelation separated by lag h, a and b can be determined by initial values, z1 and z2