[R-sig-ME] an error in gee()

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Thu Jan 14 10:11:49 CET 2010


Dear Cahn,

I tend to use the geepack package instead of the gee package. Just
change the name of the package and it works like a charm.

library(geepack)
data(Rail,package="nlme")
geese(travel~1, id=Rail, data=Rail, corstr="exchangeable") 

HTH,

Thierry


------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium

Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium

tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: r-sig-mixed-models-bounces at r-project.org
[mailto:r-sig-mixed-models-bounces at r-project.org] Namens Chaehyung Ahn
Verzonden: donderdag 14 januari 2010 4:14
Aan: r-sig-mixed-models at r-project.org
Onderwerp: [R-sig-ME] an error in gee()

Hi everyone,

I've been trying to fit a simple dataset Rail in nlme package with
gee().

This is what I tried. Rail has 3 repetitions for each id.
----------------------------------------
library(gee)
data(Rail,package="nlme")
gee(travel~1, id=Rail, data=Rail, corstr="exchangeable")
 ----------------------------------------

However, I got the following error;
 ----------------------------------------
Working Correlation[1:4,1:4]
Error in print(x$working.correlation[1:4, 1:4], digits = digits) :
  subscript out of bounds
 ----------------------------------------

I make the Rail have 4 repetitions per each id, then it works.
-----------------------------------------------
Rail1<-rbind(Rail,c(1,53),c(2,30),c(3,87),c(4,95),c(5,48),c(6,84))
aa<-order(Rail1$Rail)
Rail1<-Rail1[aa,]
gee(travel~1, id=Rail, data=Rail1, corstr="exchangeable")
---------------------------------------------------

So, it works with 4 repetitions but with 3 repetitions. Did I do
something wrong or is it a known bug?

Many thanks in advance.

cahn


--
Chaehyung Ahn
4033 Remington Oaks Circle
Cary, NC 27519
http://cahn88.blogspot.com/

	[[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

Druk dit bericht a.u.b. niet onnodig af.
Please do not print this message unnecessarily.

Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer 
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in  this message 
and any annex are purely those of the writer and may not be regarded as stating 
an official position of INBO, as long as the message is not confirmed by a duly 
signed document.




More information about the R-sig-mixed-models mailing list