The R Project SVN R

Rev

Rev 61160 | Rev 63422 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61160 Rev 61168
Line 294... Line 294...
294
## alpha and beta vary with Strip.  The starting values are provided
294
## alpha and beta vary with Strip.  The starting values are provided
295
## by the previously fitted model.
295
## by the previously fitted model.
296
## Note that with indexed parameters, the starting values must be
296
## Note that with indexed parameters, the starting values must be
297
## given in a list (with names):
297
## given in a list (with names):
298
b <- coef(musc.1)
298
b <- coef(musc.1)
299
musc.2 <- nls(Length ~ a[Strip] + b[Strip]*exp(-Conc/th),
299
musc.2 <- nls(Length ~ a[Strip] + b[Strip]*exp(-Conc/th), muscle,
300
              muscle,
-
 
301
              start = list(a = rep(b[2],21), b = rep(b[3],21), th = b[1]))
300
              start = list(a = rep(b[2], 21), b = rep(b[3], 21), th = b[1]))
302
summary(musc.2)
301
summary(musc.2)
303
\testonly{options(od)}
302
\testonly{options(od)}
304
}
303
}
305
\keyword{nonlinear}
304
\keyword{nonlinear}
306
\keyword{regression}
305
\keyword{regression}