search for: pdblocked

Displaying 20 results from an estimated 50 matches for "pdblocked".

Did you mean: blocked
2007 Jun 20
1
nlme correlated random effects
...elated: -0.904 with approximate 95% ci of -0.99 to -.32. I examined the anova of mod1 with both random effects and mod2 with just th1 and mod1 is preferred. I also examined pdDiag(th1 + th2~1) for another model (mod3) and based on the anova the original mod1 is preferred. My question is can I use pdBlocked with only 2 random effects or should I and if so how I would specify that in the model or perhaps the 95% ci for correlation is wide enough to ignore??? Dan
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
2006 Jun 30
1
lme and SAS Proc mixed
...in the refseqid, and so are correlated. The structure of both v_{11} and v_{22} are compound symmetric, and v_{12} and v{21} contain a constant for all elements of the matrix. I have tried to reproduce this using lme, but it is unclear from the documentation (and Pinheiro & Bates text) how the pdBlocked and compound symmetric structure can be combined. fit.lme<-lme(expression~End+logpgc,random=list(RefSeqID=pdBlocked(list (~1,~ProbeID-1),pdClass="pdSymm")),data=dataset,correlation=corCompSym m(form=~1|RefSeqID/ProbeID/ProbeNo)) The point estimates are essentially the same comparing...
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 me? Many greetings, Thomas PS: Is there good literatur available which could help worki...
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 accepted in the GLMM-call, though the simple form random=list(my.Subject=pdIdent(~...,...)) is accepted. what is the analogou...
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 > for crossed grouping factors but can be a problem with nested factors) > and list...
2010 May 20
1
Specify correlation structure in lme4
...the mixed-model with lmer( y ~ x1 + x2 + (1 | id) + (z1 | w ) , ... ) there is no way for me to specify a correlation structure for the random effects? Right? If I want to specify correlation structure then I need to use lme in the nlme package? Right? Crossed Random effects are coded with the pdBlocked syntax? Right? Thanks, -tgs [[alternative HTML version deleted]]
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 accepted in the GLMM-call, though the simple form random=list(my.Subject=pdIdent(~...,...)) is accepted. what is the analogou...
2010 Oct 18
1
Crossed random effects in lme
...CL77355 191 H 2010 1.137097586 10.9 3 2010:191 I want to include both nesting attempt (hack) and respirometer channel (ch) as random factors in a model trying to explain variation in oxygen consumption. From Pinheiro & Bates (2000), I've gathered that this model could be fit making use of pdBlocked and pdIdent, so I've tried fitting the below model: m1.bmr<-with(bmred.df,lme(mlmin~treat*year+massout,random=pdBlocked(list(pdIdent(~hack-1),pdIdent(~ch-1))) )) However, my model fails with the following error message: Error in getGroups.data.frame(dataMix, groups) : Invalid formula fo...
2005 Jan 05
0
lme, glmmPQL, multiple random effects
...The idea is to fit a fixed effect of Cross, and estimate random effects for females and males. (data available as an *.rda for anyone who wants it...) Following the advice from various postings from R-help and from Pinhero and Bates, I can successfully (I think) code an lme() model, using pdBlocked, pdIdent and a dummy grouping variable in a grouped data object. > load("~/RbinaryData.rda") > dd<-data.frame(RbinaryData,dum=factor(rep(1,120))) > names(dd) [1] "Cross" "Female" "Male" "Mate1" "dum" > summary(dd)...
2006 Jun 19
2
Nested variance-covariance matrix in Multilevel model
Dear R community, I have trouble implementing a nested variance-covariance matrix in the lme function. The model has two fixed effects called End and logpgc, the response variable is the logarithm to base 2 of Intensity ( log2(Intensity) ) and the random effects are called Probe and ProbeNo. The model has the following nesting structure: A Pixel is nested within the ProbeNo,the ProbeNo is
2004 Mar 01
0
question about mixed effects model
...a set with response variable (y) and two explanatory variables x1 and x2 (x1 - fixed factor, x2 - random factor). Fixed factor x1 is repeated twice for each x2 value. I believe that the correct way to fit a mixed model would be ddd <- groupedData(y ~ x1 | x2, dd) l1 <- lme(y ~ x1, random = pdBlocked(list(pdIdent(~x2-1))), data = ddd) But I get an error Error in pdConstruct.pdBlocked(object, form = form, nam = nam, data = data, : None of the arguments specify more than one block I would also have to test for significance of each variable (x1 and x2) and the way to do this seem to be to f...
2006 Feb 07
0
lme and Assay data: Test for block effect when block is systematic - anova/summary goes wrong
...say 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 has only 2 levels so I prefer to treat it as fixed: fm3<-lme(logDens~Block+sample*dilut, data=Assay2, random=list(Block = pdBlocked(list(pdIdent(~sample-1),pdIdent(~dilut-1))) )) This works fine until I try a summary(...
2006 Apr 20
1
A question about nlme
...ldata[,9:13]),collapse="+"),"-1")) > fmla1<-as.formula(paste("~",paste(colnames(ldata[,14:18]),collapse="+"),"-1")) > fmla2<-as.formula(paste("~",paste(colnames(ldata[,19:23]),collapse="+"),"-1")) > Block=pdBlocked(list(pdIdent(fmla0),pdIdent(fmla1),pdIdent(fmla2))) > lme(fixed=Score ~ factor(time)-1,data=ldata,random=list(Block), + weights=varIdent(form= ~ 1|time), + correlation=corSymm(form= ~ 1|Block/ID)) and the Error message is Error in parse(file, n, text, prompt) : syntax error in "~ &...
2006 Jun 30
0
SAS Proc Mixed and lme
...in the refseqid, and so are correlated. The structure of both v_{11} and v_{22} are compound symmetric, and v_{12} and v{21} contain a constant for all elements of the matrix. I have tried to reproduce this using lme, but it is unclear from the documentation (and Pinheiro & Bates text) how the pdBlocked and compound symmetric structure can be combined. fit.lme<-lme(expression~End+logpgc,random=list(RefSeqID=pdBlocked(list (~1,~ProbeID-1),pdClass="pdSymm")),data=dataset,correlation=corCompSym m(form=~1|RefSeqID/ProbeID/ProbeNo)) The point estimates are essentially the same comparing...
2011 Jan 21
1
TRADUCING lmer() syntax into lme()
...er me how to implement a NON NESTED random effects structure in lme() In particular I've tried the following translation from lmer to lme, as suggested from some web example mod1<-lmer(y~x*z+(x*z|factorA1/factorB)+(x*z|factorA2/factorB)) # y,x,z continuous mod2<-lme(y~x*z, random= pdBlocked(list(pdIdent(~1|factorA1/factorB ),pdIdent(~1|factorA2/factorB)))) In detail check how I've tried to state in mod1 that Iwant to evaluate randomness in the interaction x*z (i.e intercept, slope, interaction) grouped by by a general nesting structure that sets factorA1 and factorA2 as same lev...
2006 Mar 22
1
An lme model that works in old R.2.1.1 but not always in R.2.2.0 - why?
Following lme model runs fine in general under R.2.1.1 but only for 9 out of my 11 response variables under R.2.2.0. model for one of my response variables: lme(Yresp~F1fix,random=list(const=pdBlocked(list(~F2mix-1,~Ass:F1fix-1,~F3mix-1,~F1fix:F3mix-1,~F2mix:F3mix-1),pdClass="pdIdent"))) Yresp is my response variable, F1fix is a fixed effect factor whereas F2mix and F3mix are random effect factors. const is set to rep(1,dim(Ycont)[1]). The strange thing is that if an intercept is omi...
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 ge...
2012 Nov 27
0
Variance component estimation in glmmPQL
...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 ~ N(0,sig.1^2*K1) , where K1 = Z1*t(Z1), and c1 = Z1*b1. The model form I've been using is just the following: m<-glmmPQL(y~1,random=list(f=pdBlocked(list(pdIdnot(~Z.1-1),pdIdnot(~Z.2-1)))) ,family=binomial(link="logit")) I've been extracting the variance components using VarCorr(), but I've noticed that the reported variances associated with my random effects are not even close to the values I get if I evaluate their vari...
2002 Sep 13
2
Multiple random effects inlme?
Moi! I was helping to teach a course on mixed models this week, and we came across a problem with coding more than one random effect in lme when they aren't nested. As an example, suppose we have an experiment where we sample moths from several populations, and place the moths on different trees, and measure a trait (in this case survival of offspring, but that's less important). We