[R] glmmPQL and wald test or score test

2007-04-05 Thread Marc Bernard
Dear All, I would like to know if I can use the Wald test or the Score test for testing a set of parameter in a glmm model estimated by the glmmPQL method. I am asking this question because I don't know whether the glmmPQL's estimates are maximum likelihood estimates or not, and also

Re: [R] glmmPQL in 2.3.1

2006-10-29 Thread Christian Gold
http://www.uib.no/people/cgo022/ Re: [R] glmmPQL in 2.3.1 This message: [ Message body ] [ More options ] Related messages: [ Next message ] [ Previous message ] [ In reply to ] [ [R] glmmPQL in 2.3.1 ] From: Prof Brian Ripley ripley_at_stats.ox.ac.uk Date: Tue 26 Sep 2006 - 09:58:19 GMT On Mon

Re: [R] glmmPQL in 2.3.1

2006-10-29 Thread Ben Bolker
Christian Gold c.gold at magnet.at writes: 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

Re: [R] glmmPQL in 2.3.1

2006-09-26 Thread Prof Brian Ripley
On Mon, 25 Sep 2006, Justin Rhodes wrote: Dear R-help, I recently tried implementing glmmPQL in 2.3.1, I thought *I* had implemented it: are you talking about my function in package MASS or your own implementation? and I discovered a few differences as compared to 2.2.1. You appear to be

[R] glmmPQL in 2.3.1

2006-09-25 Thread Justin Rhodes
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

Re: [R] glmmPQL question!

2006-08-17 Thread Simon Wood
Will this do? best, Simon ## simulate some data... set.seed(1) joint - c(rep(1,20),rep(2,20),rep(3,20)) time - runif(60)+1 subject - factor(rep(1:12,rep(5,12))) mu - time*joint joint - factor(joint) y - rgamma(mu,mu) ## fit model b -

Re: [R] glmmPQL question!

2006-08-16 Thread Spencer Graves
I don't think there is an easy way to do that. If it were my problem, I think I'd start by trying to the model using 'lmer' associated with the 'lme4' package. I would then try to pass the fit to 'mcmcsamp' to get a random sample of parameter estimates following the posterior distribution.

[R] glmmPQL question!

2006-08-10 Thread m-krutky
Hello Folks- Is there a way to create confidence bands with 'glmmPQL' ??? I am performing a stroke study for Northwestern University in Chicago, Illinois. I am trying to decide a way to best plot the model which we created with the glmmPQL function in R. I would like to plot my actual

[R] glmmPQL help

2006-07-17 Thread Zython
I need to use the glmmPQL function for an assignment, but when I call for the summary of the function, it gives the AIC a value of NA. How do I get R to give me the AIC value? -- View this message in context: http://www.nabble.com/glmmPQL-help-tf1955675.html#a5363876 Sent from the R help forum

Re: [R] glmmPQL help

2006-07-17 Thread Prof Brian Ripley
On Mon, 17 Jul 2006, Zython wrote: I need to use the glmmPQL function for an assignment, but when I call for the summary of the function, it gives the AIC a value of NA. How do I get R to give me the AIC value? You did! Hint: have you read the reference of which this is part of the support

Re: [R] glmmPQL and random effects

2006-02-13 Thread Spencer Graves
With repeated measures, you will want to use the correlation argument in glmmPQL. For help with how to do that, you need to know that glmmPQL calls lme repeatedly. Therefore, if you have any trouble using it, I suggest you consult Pinheiro and Bates (2000) Mixed-Effects Models in S

[R] glmmPQL and random effects

2006-02-10 Thread dbahrd
Hello R users, I am trying to run a model with a binary response variable (nesting success: 0 failure, 1 success) 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

Re: [R] glmmPQL: Na/NaN/Inf in foreign function call

2006-01-18 Thread Spencer Graves
I have not seen a reply to this post, and unfortunately, I'm not smart enough to help you. If you would still like help from this listserve, please provide a terse, reproducible example that someone can in seconds copy from your email into R and presumably get the same error message

Re: [R] glmmPQL / system is computationally singular

2006-01-15 Thread Spencer Graves
Did you try traceback()? What do you get? I've had good luck with problems like this in listing the function then using debug to review while I walk throught the code line by line. This may not be the issue here, but with family=binomial, if the model being fit

Re: [R] glmmPQL and variance structure

2006-01-14 Thread Spencer Graves
Thanks for providing a partially reproducible example. I believe the error message you cite came from lme. I say this, because I modified your call to glmmPQL2 to call lme and got the following: library(nlme) fit.lme - lme(y ~ trt + I(week 2), random = ~ 1 | ID, + data

Re: [R] glmmPQL and variance structure

2006-01-14 Thread Spencer Graves
I just identified an error in my recent post on this subject: There is a very good reason that Venables Ripley's glmmPQL did NOT include an argument like the weights.lme in the glmmPQL. included in my recent post: Their function calls glm first and then provides weights computed

[R] glmmPQL: Na/NaN/Inf in foreign function call

2006-01-13 Thread David Reitter
I'm using glmmPQL, and I still have a few problems with it. In addition to the issue reported earlier, I'm getting the following error and I was wondering if there's something I can do about it. Error in logLik.reStruct(object, conLin) : Na/NaN/Inf in foreign function call (arg 3) ...

Re: [R] glmmPQL error message (was 'data order affects glmmPQL')

2006-01-11 Thread Spencer Graves
1. The function glmmPQL is in the MASS package, as can be seen by looking at the top line in the help file for glmmPQL. To find the maintainer, type 'help(package=MASS)'. The results say, Maintainer: Brian Ripley [EMAIL PROTECTED]. 2. It is generally NOT appropriate to

[R] glmmPQL / system is computationally singular

2006-01-10 Thread David Reitter
Hi, I'm having trouble with glmmPQL from the MASS package. I'm trying to fit a model with a binary response variable, two fixed and two random variables (nested), with a sample of about 200,000 data points. Unfortunately, I'm getting an error message that is difficult to understand without

Re: [R] glmmPQL and variance structure

2006-01-07 Thread Patrick Giraudoux
Dear listers, On the line of a last (unanswered) question about glmmPQL() of the library MASS, I am still wondering if it is possible to pass a variance structure object to the call to lme() within the functions (e.g. weights=varPower(1), etc...). The current weights argument of glmmPQL is

Re: [R] glmmPQL and variance structure

2006-01-01 Thread Spencer Graves
Have you received a reply to this post? I haven't seen one. I don't have an answer for you, but if you'd still like help from this list, I suggest you prepare the simplest possible toy example that you can conceive and send it to this list, restating your question in terms of that

[R] glmmPQL and variance structure

2005-12-27 Thread Patrick Giraudoux
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

Re: [R] glmmPQL

2005-11-30 Thread Spencer Graves
1. Did you try anova(f1)? The documentation for glmmPQL says it produces an object of class lme, and anova.glm might not work properly for it. Also, did you try summary(f1), as suggested in the example in ?glmmPQL? 2. Have you considered using lmer in the lme4 package?

[R] glmmPQL

2005-11-25 Thread jmgreyes
Hi, My name is José María Gómez, and I am pretty new in R. Thus, I apologize deeply if my questions are extremmely naïve.I have checked several available books and URL's, without finding any answer. I'm trying to fit Generalized Linear Mixed Models via PQL. Below I provide the structure of my

[R] glmmpql and lmer keep failing

2005-11-01 Thread Roel de Jong
Hello, I'm running a simulation study of a multilevel model with binary response using the binomial probit link. It is a random intercept and random slope model. GLMMPQL and lmer fail to converge on a *significant* portion of the *generated* datasets, while MlWin gives reasonable estimates

Re: [R] glmmpql and lmer keep failing

2005-11-01 Thread Roel de Jong
Formulated more directly, are there plans for the implementation of the crude but more robust Marginal Quasi Likelihood estimation in for example LME? Regards, Roel de Jong Roel de Jong wrote: Hello, I'm running a simulation study of a multilevel model with binary response using

Re: [R] glmmpql and lmer keep failing

2005-11-01 Thread Doran, Harold
Message- From: [EMAIL PROTECTED] on behalf of Roel de Jong Sent: Tue 11/1/2005 6:05 PM To: r-help Cc: Subject:Re: [R] glmmpql and lmer keep failing Formulated more directly, are there plans for the implementation of the crude but more robust Marginal Quasi Likelihood

[R] glmmpql and lmer keep failing

2005-11-01 Thread dave fournier
Hi, I believe we could extend our upcoming release of our freely available AD Model Builder negative binomial mixed model http://otter-rsch.com/admbre/admbre.html packaqge for R to include your model. Writing the model is simple, it is the interface with R that is a bit more

Re: [R] glmmpql and lmer keep failing

2005-11-01 Thread Roel de Jong
PROTECTED] on behalf of Roel de Jong Sent: Tue 11/1/2005 6:05 PM To: r-help Cc: Subject:Re: [R] glmmpql and lmer keep failing Formulated more directly, are there plans for the implementation of the crude but more robust Marginal Quasi Likelihood estimation in for example LME

Re: [R] GlmmPQL help

2005-09-10 Thread Spencer Graves
Have you received a reply to this question? If you still want an answer, please submit a much simpler, self-contained example that someone can copy from your email into R, examine possibly with other tools and offer comments in a minute or two. Please include the output, labeling

[R] GlmmPQL help

2005-09-09 Thread Mark Steer
Hi, I'm running a GLMM on binomial choice data. The outputs I receive are sensible except for the degrees of freedom, which come out much larger than expected. Can anyone advise please? Exptl design: Response = Choice Fixed Factors = Position, Treatment and Sex Random Factor = ID nested

[R] glmmPQL and Convergence

2005-08-19 Thread rab45+
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

[R] glmmPQL error in logLik.reStruct

2005-08-03 Thread Kechi Nzerem
Dear R users, I'm attempting to fit a GLM with random effects using the tweedie family for the error structure. I'm getting the error: iteration 1 Error in logLik.reStruct(object, conLin) : NA/NaN/Inf in foreign function call (arg 3) I'm running V2.1.0 I notice from searching the

Re: [R] glmmPQL error in logLik.reStruct

2005-08-03 Thread Kechi Nzerem
Dear all, As an update to my previous post, for anyone who is interested: Someone has kindly told me that this error does not occur in the 2.2 pre-release version. I've run my particular model with my data and this problem is solved in the 2.2 pre-release. Cheers, Kechi Nzerem -Original

[R] glmmPQL questions

2005-03-28 Thread JEB Halliday
I am looking a risk factors for disease in cattle and am interested in modelling farm and sampling cluster as random effects (My outcome is positive or negative at the level of the farm). I am using R version 2.0.1 on a Mac and have identified glmmPQL as hopefully the correct function to use. I

[R] glmmPQL

2005-02-01 Thread Mariana Rodrigues
Does someone know what is the integration method of the random effect in glmmPQL function?? Please advise. Tnks, Mariana. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] glmmPQL

2004-11-30 Thread Alex
Dear listmembers, I've adjusted a mixed model with glmmPQL: nulo-glmmPQL(POS~1,random=~1|GRUPO, family=binomial, data=new) and I've reched the following results: Linear mixed-effects model fit by maximum likelihood Data: new AIC BIClogLik 53238.5 53260.74 -26616.25 Random

[R] glmmPQL and REML

2004-10-29 Thread sgrabasa
Hi, I am trying to use glmmPQL package for Generalized linear mixed models. This package works by repeated calls to lme. lme uses by default REML method for estimation. Then, does glmmmPQL use REML too? In contrast, how can I change it? I have tried it, writing : method=REML, but the

Re: [R] glmmPQL and REML

2004-10-29 Thread Prof Brian Ripley
On Fri, 29 Oct 2004 [EMAIL PROTECTED] wrote: I am trying to use glmmPQL package for Generalized linear mixed models. This package works by repeated calls to lme. lme uses by default REML method for estimation. Then, does glmmmPQL use REML too? In contrast, how can I change it? I have

[R] glmmPQL correlation structure

2004-09-22 Thread Martin Henry H. Stevens
Running Mac OS 10.3.5 and R 2.0 Does glmmPQL use the same spatial dependence models as gls in nmle? It does not seem to - I get the following, for example: m2 - glmmPQL(S.Early ~ fertilized*watered, data=geodat, family=poisson, random=~1|col) iteration 1 iteration 2 plot(Variogram(m2,

Re: [R] glmmPQL correlation structure

2004-09-22 Thread Spencer Graves
Have you tried GLMM in lme4? Doug Bates is the primary architect of both nlme and lme4. Therefore, I would think that a spatial dependence model that works in nlme might also work in GLMM. hope this helps. spencer graves Martin Henry H. Stevens wrote: Running Mac OS 10.3.5 and R

FW: [R] glmmPQL and random factors

2004-09-14 Thread Lorenz . Gygax
I have just realised that I sent this to Per only. For those interested on the list: -Original Message- From: Gygax Lorenz FAT Sent: Tuesday, September 14, 2004 4:35 PM To: 'Per Toräng' Subject: RE: [R] glmmPQL and random factors Hi Per, glmmPQL(Fruit.set~Treat1*Treat2+offset(log10

Re: [R] glmmPQL in R and S-PLUS 6 - differing results

2004-08-19 Thread Prof Brian Ripley
glmmPQL calls lme, and it is that which differs between S-PLUS and R. These are optimization problems with multiple local maxima, and like any complex statistical fitting problem you should not expect all programs to give the same answer. The short answer is to believe all of them, and to

Re: [R] glmmPQL in R and S-PLUS 6 - differing results

2004-08-19 Thread Andrew Robinson
Professor Ripley, These are optimization problems with multiple local maxima, and like any complex statistical fitting problem you should not expect all programs to give the same answer. Examining the log-likelihoods from the anova statements, while fit1 and m1 are similar, the maximum

[R] glmmPQL in R and S-PLUS 6 - differing results

2004-08-18 Thread Simon
Greetings R-ers, A colleague and I have been exploring the behaviour of glmmPQL in R and S-PLUS 6 and we appear to get different results using the same code and the same data set, which worries us. I have checked the behaviour in R 1.7.1 (MacOS 9.2) and R. 1.9.0 (Windows 2000) and the results

[R] GlmmPQL

2004-08-02 Thread
Dear friends, I am apologise to ask again about PQL, because I did not receive any answer from the first question. Is it possible to fit a crossed random effects model using glmmPQL and, because I tyred to use this codes

[R] GlmmPQL

2004-06-09 Thread O Tosas Auguet
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

Re: [R] GlmmPQL

2004-06-09 Thread Prof Brian Ripley
I think you need to read the references given in ?glmmPQL and its reference to understand what PQL actually does. If you don't know the theory behind a statistical method, you should try to understand it before trying to use it. The same applies to AIC. Even if AIC were computable, do you know

[R] glmmPQL:

2004-05-28 Thread Spencer Graves
I'm getting a strange error from glmmPQL. Consider the following sample code: set.seed(8) N. - 1000 z - rnorm(N.) pr.good - exp(-1e-4*exp(2+2*z)) quantile(pr.good) DF. - data.frame(yield=rbinom(N., N., pr.good)/N., Offset=rep(-10, N.), nest=1:N.) fit -

[R] glmmPQL - predict (..., type= 'response')?

2004-05-13 Thread Lorenz . Gygax
Dear R users, Is there something like predict (..., type= 'response') for glmmPQL objects or how would I get fitted values on the scale of the response variable for the binomial and the poisson family? Any pointers are appreciated. Thanks, Lorenz - Lorenz Gygax, Dr. sc. nat. Tel: +41 (0)52

[R] glmmPQL

2004-04-28 Thread Liliana Forzani
when I tried the example in glmmPQL I got an error library(nlme) summary(glmmPQL(y ~ trt + I(week 2), random = ~ 1 | ID, family = binomial, data = bacteria)) iteration 1 iteration 2 iteration 3 iteration 4 iteration 5 iteration 6 Error: No slot of name reStruct for this

Re: [R] glmmPQL

2004-04-28 Thread Liliana Forzani
I thinks I understand the porblem, you can not use glmmPQL if you have open lme4 On Wed, 28 Apr 2004, Liliana Forzani wrote: when I tried the example in glmmPQL I got an error library(nlme) summary(glmmPQL(y ~ trt + I(week 2), random = ~ 1 | ID, family =

[R] GlmmPQL with binomial errors

2004-03-06 Thread O Tosas Auguet
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

Re: [R] GlmmPQL with binomial errors

2004-03-06 Thread Prof Brian Ripley
glmmPQL is part of MASS, and that is support software for a book. Do look in the book and its references On Sat, 6 Mar 2004, O Tosas Auguet wrote: 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

Re: [R] GlmmPQL with binomial errors

2004-03-06 Thread Henric Nilsson
At 13:52 2004-03-06, you wrote: The reason for this question, is that I am trying to fit a variance components analysis with a single random effect and no fixed effects.The only way I know to test for the significance of the single level of random effects is by comparing the model with a glm

[R] GLMMpql: reporting on main effects

2004-02-09 Thread Sarah Richardson
Dear R users I am using GLMMpql to analyse some nested negative binomial response data. How do I summarise the significance of my main effects? For example, in a standard linear mixed model (lme), I would use anova.lme to obtain an F statistic and P value for each of my main effects: how do

[R] glmmPQL, log-likelihoods issue

2003-11-21 Thread Andrew Perrin
Greetings- a reviewer for a paper of mine noted an anomaly in some models I ran using glmmPQL (from the MASS package). Specifically, the models are three-level hierarchical probit models estimated using PQL under R. The anomaly is that the log-likelihoods decrease (or, alternatively -2logLik

Re: [R] glmmPQL, log-likelihoods issue

2003-11-21 Thread Prof Brian Ripley
glmmPQL does not fit by maximum likelihood, and what is being quoted is not a likelihood for the original problem. On Fri, 21 Nov 2003, Andrew Perrin wrote: Greetings- a reviewer for a paper of mine noted an anomaly in some models I ran using glmmPQL (from the MASS package). Specifically,

Re: [R] glmmPQL, log-likelihoods issue

2003-11-21 Thread Andrew Perrin
Sorry for my ignorance, but could you explain a little further? I'm guessing from your response that this makes the log-likelihood that is quoted by glmmPQL a poor measure of model fit. Are there are statistics that would be better for reporting model fit? thanks.

Re: [R] glmmPQL, log-likelihoods issue

2003-11-21 Thread Douglas Bates
Andrew Perrin [EMAIL PROTECTED] writes: Sorry for my ignorance, but could you explain a little further? I'm guessing from your response that this makes the log-likelihood that is quoted by glmmPQL a poor measure of model fit. Are there are statistics that would be better for reporting model

Re: [R] glmmPQL, log-likelihoods issue

2003-11-21 Thread Andrew Perrin
On Fri, 21 Nov 2003, Douglas Bates wrote: Andrew Perrin [EMAIL PROTECTED] writes: Sorry for my ignorance, but could you explain a little further? I'm guessing from your response that this makes the log-likelihood that is quoted by glmmPQL a poor measure of model fit. Are there are

[R] glmmPQL probelm

2003-09-03 Thread Andrej Kveder
Dear listers, First let me appologize if the same mail arrives multiple times. Recently I had some probelms sending my e-mails to the list. I encountered a problem when running glmmPQL procuedure doing multilevel modeling with a dichotomous outcome. Those are the two error messages I usually

Re: [R] glmmPQL probelm

2003-09-03 Thread Prof Brian Ripley
Nothing to do with glmmPQL (as traceback() would have shown you). I think you are looking for ?try. On Wed, 3 Sep 2003, Andrej Kveder wrote: Dear listers, First let me appologize if the same mail arrives multiple times. Recently I had some probelms sending my e-mails to the list. I

[R] glmmPQL() and memory limitations

2003-08-18 Thread Elliott Moreton
Hi, all, When running glmmPQL(), I keep getting errors like Error: cannot allocate vector of size 61965 Kb Execution halted This is R-1.7.1. The data set consists of about 11,000 binary responses from 16 subjects. The model is fixed = SonResp ~ (ordered

Re: [R] glmmPQL() and memory limitations

2003-08-18 Thread Thomas W Blackwell
Elliott - I don't know if you've had any other responses off-list yet; none have shown up on the r-help mailing list during the day today. I'm really NOT the most expert person to answer this, but I'll give it a try. Your option (1) seems entirely possible to me. Let me do some thinking out

[R] glmmPQL using REML instead of ML

2003-07-25 Thread Emma Tan
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

Re: [R] glmmPQL using REML instead of ML

2003-07-25 Thread kjetil brinchmann halvorsen
On 25 Jul 2003 at 16:24, Emma Tan wrote: 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

[R] glmmPQL with crossed random effects

2003-07-17 Thread Emma Tan
Is it possible to fit a crossed random effects model using glmmPQL and, e.g. random=pdBlocked(list(pdIdent(~a-1),pdIdent(~b-1))) as the random part of the model? I seem to be getting errors on R using glmmPQL in this way, although if I try something very similar using 'lme' instead of 'glmmPQL',