Hello list,
I am trying to fit linear mixed model with fixed effect being cyclic cubic
regression splines, because my data are defined on a circle, while circle
is divided into 24 directions. I defined a variable Direction which is
numeric and has values 1,2,... 24. I receive this error message:
out.lme.8=lme(Y~ s(Direction,bs="cc",k=8),
+ random=~1|PatientID,
+ data=mydata,na.action=na.omit,method="ML")
Error in model.frame.default(fixed, dataMix) :
invalid type (list) for variable 's(Direction, bs = "cc", k = 8)'
I wonder if anyone has any suggestion, please?