search for: glmmpql

Displaying 20 results from an estimated 275 matches for "glmmpql".

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...
2003 Apr 22
1
glmmPQL and additive random effects?
I'm a bit puzzled by how to write out additive random effects in glmmPQL. In my situation, I have a factorial design on two (categorical) random factors, A and B. At each combination, I have a binary response, y, and two binary fixed covariates, C and D. If everything were fixed, I would use glm(y ~ A + B + C + D, family = binomial) My first thought was to use glm...
2009 Oct 21
1
odd evaluation within correlation argument of glmmPQL
[I think I've seen this reported before but can't locate it any more. I believe this oddity (glitch? feature?) is behind a query that Jean-Baptiste Ferdy asked a year ago <http://finzi.psych.upenn.edu/Rhelp08/2008-October/176449.html>] It appears that glmmPQL looks in the global workspace, not within the data frame specified by the "data" argument, for the variables specified in the "form" argument of spatial correlation structures provided to the "correlation" argument. This is potentially confusing/dangerous, because you...
2013 Jul 11
1
Differences between glmmPQL and lmer and AIC calculation
...re two different groups of fish (coded as 0 and 1 which should be the dependent variable) based on their swimming activity, habitat choice, etc. (independent variables). Each fish has several observations over time (repeated measurements) which I included as random factor in my models using library glmmPQL (package MASS). Because I have a binary data structure, I am using generalized linear mixed models. Using library glmmPQL the results reflect my descriptive analyses and the results are sound. However, we also want to rank several candidate models using AIC. And this is where the problems start. B...
2006 Oct 29
1
glmmPQL in 2.3.1
I have come across the previous communication on this list in September (copied below) because I had received the same error message. I understand from Brian Ripley's reply that anova should not be used with glmmPQL because it is not an adequate method, and that this is now shown with an error message. My question is, what method *should* be used? Using summary does not give me the result I want, because it shows the significance of each combination of factor *levels*, rather than factors, which can quickly...
2006 Apr 10
1
Weights in glmmPQL
Hello, I am using the R function glmmPQL to fit a logistic GLMM, with weights. I am finding that I get fairly different parameter estimates in glmmPQL from fitting the full dataset (with no "weight" statement) and an equivalent, shorter dataset with the weights statement. I am using the weights statement in the 'glmmPQL'...
2005 Aug 20
1
glmmPQL and Convergence
I fit the following model using glmmPQL from MASS: fit.glmmPQL <- glmmPQL(ifelse(class=="Disease",1,0)~age+x1+x2,random=~1|subject,family=binomial) summary(fit.glmmPQL) The response is paired (pairing denoted by subject), although some subjects only have one response. Also, there is a perfect positive correlation between t...
2005 Oct 19
1
anova with models from glmmPQL
Hi ! I try to compare some models obtained from glmmPQL. model1 <- glmmPQL(y~red*yellow+I(red^2)+I(yellow^2)+densite8+I(densite8^2)+freq8_4 +I(freq8_4^2), random=~1|num, binomial); model2 <- glmmPQL(y~red*yellow+I(red^2)+I(yellow^2)+densite8+I(densite8^2)+freq8_4 , random=~1|num, binomial); anova(model1, model2) here is the answer : Erreur dan...
2006 Mar 24
1
predict.glmmPQL Problem
Dear all, for a cross-validation I have to use predict.glmmPQL() , where the formula of the corresponding glmmPQL call is not given explicitly, but constructed using as.formula. However, this does not work as expected: x1<-rnorm(100); x2<-rbinom(100,3,0.5); y<-rpois(100,2) mydata<-data.frame(x1,x2,y) library(MASS) # works as expected model1<...
2005 Sep 04
1
specification for glmmPQL
Hello All, I have a question regarding how glmmPQL should be specified. Which of these two is correct? summary(fm.3 <- glmmPQL(cbind(response, 100 - response) ~ expt, data = data.1, random = ~ 1 | subject, family = binomial)) summary(fm.4 <- glmmPQL(response ~ expt, data = data.2,...
2004 Mar 06
2
GlmmPQL with binomial errors
Hi all! I hope somebody can help me solve some doubts which must be very basic, but I haven't been able to solve by myself. The first one, is how to assess for overdispersion in GlmmPQL when fitting binomial or poisson errors. The second one is whether GlmmPQL can compare models with different fixed effects. The third doubt, regards the way I should arrange my data in a GlmmPQL with binomial errors. In glm, I am supposed to create cbind vector joining the "number of succ...
2006 Feb 10
1
glmmPQL and random effects
...and 8 fixed terms. Nesting success was examined in 72 cases in 34 territories (TER) during a 6 study years. Territories are nested within 14 patches (PATCH). I want to run a model taking into account these nested factors and repeated observation. To do this, I assume that the best option is to use glmmPQL from MASS package. Am I wrong? In glmmPQL, I have included the random terms as follow: random=~1|YEAR/PATCH/TER, but I am unclear if this syntax is right for this case (?). I would greatly appreciate any help! Regards, Hugo Hugo Robles Department of Animal Biology University of Le??n (Spain)
2003 Jul 25
1
glmmPQL using REML instead of ML
Hi, In glmmPQL in the MASS library, the function uses repeated calls to the function lme(), using ML. Does anyone know how you can change this to REML? I know that in lme(), the default is actually set to REML and you can also specify this as 'method=REML' or 'method'ML' but this isn't a...
2006 Sep 25
1
glmmPQL in 2.3.1
Dear R-help, I recently tried implementing glmmPQL in 2.3.1, and I discovered a few differences as compared to 2.2.1. I am fitting a regression with fixed and random effects with Gamma error structure. First, 2.3.1 gives different estimates than 2.2.1, and 2.3.1, takes more iterations to converge. Second, when I try using the anova function...
2008 Sep 02
1
plotting glmmPQL function
hello all, i'm an R newbie struggling a bit with the glmmPQL function (from the nlme pack). i think i've managed to run the model successfully, but can't seem to plot the resulting function. plot(glmmPQL(...)) plots the residuals rather than the model... i know this should be basic, but i can't seem to figure it out. many thanks in advance. j...
2004 Jun 09
1
GlmmPQL
Dear all, I have two questions concerning model simplification in GlmmPQL, for for random and fixed effects: 1. Fixed effects: I don't know if I can simply specify anova(model) and trust the table that comes up with the p value for each variable in the fixed effects formula. I have read that the only way to test for fixed effects is to do approximate wald tests bas...
2003 Jan 14
1
glmmPQL and anova
...aov(y ~ A*B*C + Error(subj/(A+B+C))) but since the distribution of the dependent measure is clearly nonnormal, I would like to fit an analoguous model which is appropriate and I believe this would be a GLMM with a logit link and a random intercept for subjects. I have fitted this model using 'glmmPQL' function in MASS as: > glmmPQL(cbind(y,4-y) ~ A*B*C, random = ~ 1|subj, family=binomial(),data) which seemed to do the trick. But I would like to present the results in an ANOVA-type table so that they are easiliy interpretable for the readers. I know the anova(glm, test="Chisq"...
2004 Mar 20
1
contrast lme and glmmPQL and getting additional results...
...each of 15 units, and I'm estimating this with randomly varying intercepts along with an AR1 correction for the error terms within units. There is no correlation across units. Blundering around in R for a long time, I found that for linear/gaussian models, I can use either the MASS method glmmPQL (thanks to Venables and Ripley) or the lme from nlme (thanks to Pinheiro and Bates). (I also find that the package lme4 has GLMM, but I can't get the correlation structure to work with that, so I gave up on that one.) The glmmPQL and lme results are quite similar, but not identical. Here...
2003 Apr 14
1
Problem with nlme or glmmPQL (MASS)
Hola! I am encountering the following problem, in a multilevel analysis, using glmmPQL from MASS. This occurs with bothj rw1062 and r-devel, respectively with nlme versions 3.1-38 and 3.1-39 (windows XP). > S817.mod1 <- glmmPQL( S817 ~ MIEMBROScat+S901+S902A+S923+URBRUR+REGION+ + S102+S103+S106A+S108+S110A+S109A+S202+S401+S557A+S557B+ + YHO...
2005 Oct 17
0
pdIdnot / logLik in glmmPQL
Dear R users, I have been using the pdMat class "pdIdnot" (from the mgcv package)instead of "pdIdent" to avoid overflow in GLMM fits with the MASS package function glmmPQL, of the following form: fit1 <- glmmPQL(fixed=y0~-1+xx0, random=list(gp=pdIdent(~-1+zz0)), family=binomial) # vulnerable to overflow fit2 <- glmmPQL(fixed=y0~-1+xx0, random=list(gp=pdIdnot(~-1+zz0)), family=binomial) # overflow-proof In instances...