search for: modlm

Displaying 2 results from an estimated 2 matches for "modlm".

Did you mean: modem
2010 Jul 02
1
Producing residual plots by time for lme object
...duce a residual plot for each time using panel.xyplot function but I get an error message. Here's a simple example, library(nlme) set.seed(1544) longdata <- data.frame(ID=gl(10,1,50), y=rnorm(50), time = as.numeric(gl(5,10,50)), x = rnorm(50)) longdata$y[5] <- NA longdata$x[35] <- NA modlme<- lme(fixed=y ~ time + x,                 random= ~ 1 | ID,                 na.action=na.exclude, data=longdata) plot( modlme, abs( resid(., type = 'p')) ~ fitted(.) | time,           panel = function(x, y, ...) {                 panel.xyplot( x, y, ...)                 panel.loess( x...
2007 Jun 12
0
nlme model
...B<-c(.007,1,3,2,2,2,2,2,2,2,2,2,.05,.001,.8) st<-list(ad=B[1],ahabdiv=B[2],abas=B[3:12],b=B[13],c=B[14],z=B[15]) modnls.a<-nls(sr~ad*log(d)+ahabdiv*habdiv+abas[bas]+(b/(c+(da^-z))), start=st,trace=T) I next used a random slope and intercept model using lmer from the package (lme4). modlme<-lmer(y~d+habdiv+log(da)+(log(da)|bas),method='ML') What I would like to do is use a similar model to the modlme, but use (b/(c+(da^-z))) instead of log(da). Keeping d and habdiv as fixed effects and the sr-da relationship for each basin as a random effect. For the life of me I can n...