I have a problem using geeglm
form the geepack
library. I don't understand what is wrong:
df <- structure(list(ID = c(3, 3, 10, 11, 11, 13),
VO2max = c(3584.2, 2235.7, 4191.6, 2025.1, 3184.6, 2134.9),
HRR120 = c(56, 34, 60, 57, 30, 67),
Age = c(16, 24, 29, 11, 27, 34),
Weight = c(63.8, 72, 81, 41, 108, 55),
Height = c(176, 167, 178, 150, 176, 156 )),
class = c("data.frame"))
library(geepack)
geeglm(formula = "VO2max ~ HRR120 ",family = "gaussian",corstr = "independence",id = ID,data = df)
Error in mcall$formula[3] <- switch(match(length(sformula), c(0, 2, 3)), : incompatible types (from language to character) in subassignment type fix
I tried
df$ID <- as.character(df$ID)
df$ID <- as.factor(df$ID)
without any luck. Does anyone have an explanation ?