Try to fit a longitudinal dataset using generalized mixed effects models
via the R function gamm() as follows:

 

library(mgcv)

gamm0.fit<- gamm(y ~ x+s(z,bs="cr"),

                random=list(

                            x=~1,

                            s(z,bs="cr")=~1

                            ),

                     family = binomial, data =raw)

the data is given by raw=(id, y,x,z). It doesn't work. If you can tell
me how to fix this problem, it will be appreciated.

 

 

 

 



	[[alternative HTML version deleted]]

