I have a dataframe in R that looks like the following

cluster id period u_3 timeID startTrt Ijt error y

1: 1 1 0 -1.26 1 1 0 1.2015 17.809

2: 1 2 0 -1.26 1 1 0 -1.6577 14.950

3: 1 3 0 -1.26 1 1 0 -3.8639 12.744

4: 1 4 0 -1.26 1 1 0 1.4978 18.105

5: 1 5 0 -1.26 1 1 0 -5.3182 11.289

When I try to run a gee model on it as follows

test <- GEE.var.fg(y ~ factor(period) + factor(Ijt),id="id",family=gaussian, dx,corstr="exchangeable")

I get this error message:

Beginning Cgee S-function, @(#) geeformula.q 4.13 98/01/27

running glm to get initial regression estimate

(Intercept) factor(period)1 factor(period)2 factor(period)3 factor(period)4 factor(period)5 factor(Ijt)1

17.25 -8.27 -6.47 -9.13 -8.17 -11.89 8.96

Error in gee.fit$working.correlation[1, 2] : subscript out of bounds

Does anyone know why this is? How would I troubleshoot this?