For my research, I want to use non linear mixed model. I went through internet to find out the code corresponding to this test but I'm still struggling with it. Thus, I'm looking for a code in R. Any suggestion?
It depends what you are looking for. Do you want a generalized linear model with random effects ? You might look at glmmTMB for that. There's also nlme() , though I'm not sure in which cases that would be used.
I would vote for generalized additive mixed models (GAMMs). In R you can use the mgcv package. You can model any kind of linear and nonlinear relationships and a mixture of linear and nonlinear terms.
Hi! I agree with Holger, mgcv is a nice package, and other packages have been additionally developed for visualization. Depending on how you wanna specify random effects, gamm4 might fit better, though. Syntax is easy, give it a try.