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]]


