Thomas
thanks for the clarification! One correction is that I believe glmmPQL was
developed by Brian Ripley and Bill Venables; as part of the fabulous MASS
library - Software and datasets to support `Modern Applied Statistics with
S', fourth edition, by W. N. Venables and B. D. Ripley. Springer, 2002, ISBN
0-387-95457-0.
Im looking forward to an interesting webinar on generalized linear mixed
models this week
http://www.insightful.com/news_events/webcasts/2005/05novartis/default.asp
Michael
-----Original Message-----
From: Thomas Jagger [mailto:tjagger@blarg.net]
Sent: Thu 5/12/2005 3:12 PM
To: Michael O'Connell
Cc: s-news@lists.biostat.wustl.edu
Subject: RE: [S] Interpreting glmmpql results.
For those who do not have Splus 7,
glmmPQL is available with the MASS library. Here is a comparable
result
using both:
glme is from the correlated data library and
glmmPQL is from the MASS library.
Both glmmPQL and glme are from Jose Pinheiro, as I understand, with
glmmPQL
generated from iterative calls to lme.
Thus, they should and do on this one example, produce consistent
results.
However, Splus Version 7.0 glme has additional methods such as
LAPLACE and
AGQUAD for likelihood approximations. However, in this case the
Residual
variance is 1.0.
summary(glme(y ~ trt + I(week > 2), random = ~ 1 |
ID,family=binomial,data=bacteria,method="PQL"))
Generalized linear mixed-effects model fit by PQL
Family: Binomial with Logit link
Data: bacteria
AIC BIC logLik
1113.68 1134.042 -550.8402
Random effects:
Formula: ~ 1 | ID
(Intercept) Residual
StdDev: 1.409806 0.7801296
Fixed effects: y ~ trt + I(week > 2)
Value Std.Error DF t-value p-value
(Intercept) 1.940794 0.2810486 169 6.905548 <.0001
trt1 -0.623590 0.3219447 47 -1.936949 0.0588
trt2 -0.043518 0.1911304 47 -0.227687 0.8209
I(week > 2) -0.803483 0.1791946 169 -4.483858 <.0001
Deviance Within-Group Residuals:
Min Q1 Med Q3 Max
-2.391251 0.1730478 0.380906 0.5270572 1.447784
Number of Observations: 220
Number of Groups: 50
> 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
Linear mixed-effects model fit by maximum likelihood
Data: bacteria
AIC BIC logLik
1113.622 1133.984 -550.8111
Random effects:
Formula: ~ 1 | ID
(Intercept) Residual
StdDev: 1.410632 0.7800514
Variance function:
Structure: fixed weights
Formula: ~ invwt
Fixed effects: y ~ trt + I(week > 2)
Value Std.Error DF t-value p-value
(Intercept) 1.941156 0.2811167 169 6.905160 <.0001
trt1 -0.623677 0.3220311 47 -1.936699 0.0588
trt2 -0.043550 0.1911861 47 -0.227787 0.8208
I(week > 2) -0.803628 0.1791689 169 -4.485307 <.0001
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-5.198533 0.1572341 0.3513082 0.4949478 1.744882
Number of Observations: 220
Number of Groups: 50
>
-----Original Message-----
From: s-news-owner@lists.biostat.wustl.edu
[mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of Michael
O'Connell
Sent: Thursday, May 12, 2005 11:44 AM
To: Clegg, Philip; s-news@lists.biostat.wustl.edu
Subject: Re: [S] Interpreting glmmpql results.
1) I dont think glmmpql is a function that ships with S-PLUS 7. Is
this from
a user-contributed package? I strongly recommend that you use the new
correlatedData library in S-PLUS 7. There is help and doc in the
library
directory eg in:
C:\Program Files\Insightful\splus70\library\correlatedData
as a basic install
The correlatedData library includes PQL ( glme() ); and exact
(quadrature)
methods for binomial and Poisson regression. PQL generally works
well,
contrary to what some folks say :-) See Breslow and Clayton (1993)
and
Wolfinger and O'Connell (1993) for details. The latter paper has a
more
intuitive derivation and explanation even if I do say so :-)... And
PQL is
implemented in the correlatedData library in a way that improves upon
an
earlier SAS MACRO implementation...
Mixed models with non-Gaussian responses is a very interesting,
important
and
expansive area! Please join us at next weeks (free) webinar on this
topic,
given by Jose Pinheiro of Novartis who was deeply involved in the
development
of glme() and correlatedData:
http://www.insightful.com/news_events/webcasts/2005/05novartis/default.asp
2) In general, to set a factor variable in S-PLUS, set
options()$contrast to
contrast.treatment or something. Look at the help on contrast and/or
search
the list archive.
3) Lets get on with our statistical software discussions on the list
- it is
a great user-contributed S-PLUS/stats list and everyone is making
very
valuable contributions. So lets keep it coming. In particular, if
anyone
develops any interesting applications of glme() and the
correlatedData
library please let me know - I have a goal to pull together a
collection of
applications in this area over the coming year.
Good luck !
Michael
Michael O'Connell, Ph.D.
Director, Life Science Solutions W: (800) 569-0123 x454
Insightful Corporation
moconnell@insightful.com www.insightful.com
-----Original Message-----
From: Clegg, Philip [mailto:P.Clegg@leedsmet.ac.uk]
Sent: Thursday, May 12, 2005 11:20 AM
To: 's-news@lists.biostat.wustl.edu'
Subject: [S] Interpreting glmmpql results.
I see that in the recent period, there have been many postings about
list
etiquette, the appropriateness of questions asked, and the need to
avoid
trivial questions. I recently asked about why glmmpql seems to treat
two
level factors as continuous variables but received no replies. I
hope this
does not mean my question is trivial. I am also concerned that I have
not
asked the question in the right way. But what is the right way to ask
the
question.
It is difficult to formulate questions in appropriate statistical
language
if your own are of expertise is an a non-mathematical or statistical
subject. I want to use glmmpql as a tool to find out if there is a
spatial
component to suicide. I doubt that I will ever understand how the
tool was
constructed - just as I have no real understanding of what lies
underneath
the bonnet/hood of my car.
Best wishes,
Phil
-----Original Message-----
From: Clegg, Philip [mailto:P.Clegg@leedsmet.ac.uk]
Sent: 10 May 2005 12:38
To: 's-news@lists.biostat.wustl.edu'
Subject: [S] Numerical codes in GlMMPQL
I am attempting to fit a glmmpql model on suicide case history data
using
postcode as a spatial random effect. Most of the variables I wish to
test
are in binary form with codes 0, 1 and -1 for missing data. In the
following
example, the p-value for the intercept is highly significant
indicating that
there is a spatial postcode effect. The relationship between Gender
and
'notreatz' (whether or not cases had treatment for mental illness in
the
last year) is also significant. However, my problem is that gender
does not
appear to have been treated as a factor but as a continuous variable.
I
guess the problem is that S-Plus does not recognise my variables as
categorical. I have tried using as.factor but that has not helped.
Has
anyone any advice please? Best wishes, Phil
> summary(glmmPQL(notreatz ~ genderz, family = binomial, random = ~
1 |
POSTCODE))
iteration 1
Linear mixed-effects model fit by maximum likelihood
Data: NULL
AIC BIC logLik
1026.248 1040.103 -509.1238
Random effects:
Formula: ~ 1 | POSTCODE
(Intercept) Residual
StdDev: 0.01600788 0.9999703
Variance function:
Structure: fixed weights
Formula: ~ invwt
Fixed effects: notreatz ~ genderz
Value Std.Error DF t-value p-value
(Intercept) 0.7145204 0.1805515 229 3.957432 0.0001
genderz 0.5382434 0.1805512 5 2.981112 0.0308
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-1.870798 -1.092102 0.5345133 0.9156031 0.9156726
Number of Observations: 236
Number of Groups: 230
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu
with the
BODY of the message: unsubscribe s-news
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu
with
the BODY of the message: unsubscribe s-news
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu
with
the BODY of the message: unsubscribe s-news
|