my.panel <- function(x,y) {
expn3 <- deriv3(~ b0 - b1 * exp(-b2*x^b3),
c("b0","b1","b2","b3"),
function(x,b0,b1,b2,b3) {})
param <- nls(y ~ expn3(x,b0,b1,b2,b3), start = c(b0 = 1, b1 =
1, b2 = 1, b3 = 1),
data = data.frame(x = x, y = y))$parameters
x.temp <- seq(min(x), max(x), length = 40)
y.temp <- param[1] - param[2] * exp(-param[3]*x.temp^param[4])
lines(x.temp, y.temp)
}
xyplot(cpdiff~groupsize | sim, data = csim,panel = function(x,y,...)
{panel.xyplot(x,y,cex=.60); my.panel(x,y)},
strip=function(...) strip.default(...,strip.name=c(T,T)))
The error I get is this:
Error in nls(y ~ expn3(x, b0, b1, b2, b3), start = c(b0 =..: couldn't
find function "expn3"
Dumped
Any ideas? I'm running version 4.0 on Windows95.
Thanks in advance.
Tim
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news