Skip to content

Instantly share code, notes, and snippets.

@MJacobs1985
Created October 3, 2021 13:50
Show Gist options
  • Select an option

  • Save MJacobs1985/1365d7ed9e623cac7236dbece595173c to your computer and use it in GitHub Desktop.

Select an option

Save MJacobs1985/1365d7ed9e623cac7236dbece595173c to your computer and use it in GitHub Desktop.
NLMIXED in R
try<-nlsList(y~f1(x,U,D,Kd),
data=Grass_new,
start=list(U=rep(19.7,2),D=rep(52,2),Kd=0.035)) # the (x,2) splits the variable in two
summary(try)
plot(try)
plot(intervals(try))
plot(try, Trial ~ resid(.), abline = 0 ) # Because a single concentration curve is used for all subjects, the individual differences noticed in Figure 6.3 are incorporated in the residuals, thus inflating the residual standard error
plot(try, as.factor(Cow) ~ resid(.), abline = 0 )
plot(try, as.factor(Replicate) ~ resid(.), abline = 0 )
plot(fixef(try))
coef(try)
qqnorm(try)
plot(ranef(try))
nlme(try)
plot( intervals( try ), layout = c(5,1) )
pairs(try)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment