Created
October 3, 2021 17:36
-
-
Save MJacobs1985/b9fe7a0ed278a2e6c886f7562d56361b to your computer and use it in GitHub Desktop.
NLMIXED in R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Grass_new<-groupedData(y~x|Trial, | |
| data=Grass2, | |
| FUN=mean, | |
| labels=list(x="Time", y="DMres")) | |
| nlin<-nlsList(y~f1(x,U,D,Kd), | |
| data=Grass_new, | |
| start=list(U=19.7,D=52,Kd=0.035)) | |
| nlmixed<-nlme(y~U+D*exp(-(Kd*x)), | |
| data=Grass_new, | |
| fixed=list(U+D+Kd~1), | |
| random=pdDiag(U+D~1), | |
| method="REML", | |
| start=c(20,50.88,0.02698)) | |
| plot(comparePred(nlin, nlmixed, level=1)) | |
| coef(nlmixed, level=1) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment