HELLO ALL,  

I AM GETTING AN ERROR MESSAGE WHEN TRYING TO RUN A GAMM MODEL LIKE THE ONE 
BELOW. 

 I AM USING R VERSION 2.14.1 (2011-12-22) AND MGCV 1.7-12. 

M1 <-gamm(DepVar ~ Treatment + s(Year, by =Treatment), random=list(Block=~1), 
na.action=na.omit, data = mydata, correlation = corARMA(form =~ Year|Treatment, 
p = 1, q = 0)) 

THIS IS THE ERROR MESSAGE 

Error in `*tmp*`[[k]] : attempt to select less than one element 

I have 312 observations. I get the error when I introduce the correlation 
structure in the model. I have the same problem even if I use /corAR1() /or I 
set bs=”cr”. I also tried to increase the number of iterations using the 
control option, but I find the same problem.  

Is there any other way in which I could include the correlation structure? 

I would appreciate any suggestions 

thanks! 

eva
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to