I desperately need help. I have a continuous Response variable, a fixed Treatment effect (factor variable with three levels), a fixed Time effect (factor variable with nine fixed time points), and a Subject effect which is the random effect (I have 34 subjects, basically every subject tries each Treatment at each Time point). I am trying to fit a mixed model with unstructured covariance, using the following command and I keep getting the error below. Also, it takes for EVER for R to return the error. The problem seems to be in the corSymm aspect. I have never done this before and R is still pretty hard for me, so any help would be greatly appreciated. Thank you!
cs1 <- corSymm(form = ~ 1 | Subject)
cs1 <- Initialize(cs1, data = Mydata)
model <- gls(Response ~ Time+Treatment+Treatment*Time, correlation = cs1, data = Mydata)
anova(model)
Error in gls(Response ~ Time + Treatment + Treatment * Time, correlation = cs1, : function evaluation limit reached without convergence (9)