I hope that the mailing list is the correct forum for the question below. I
have trouble calling functions nlsList and nlme from
another function. Any help would be greatly appreciated.
Jens Praestgaard
Human Genome Sciences
Rockville MD.
I have a data set v with two components, v$mixeddat and v$init. They are
listed below:
a b d c cdiff
1.045617e+04 2.408045e+05 9.296929e-01 1.490621e-02 4.874540e-03
The following two lines of code fits first a nonlinear regression for each
level of rep, next a model with a random effect in one parameter.
However, when I try to run the same code from within a function, with this
call :
testfunc
function(dat=v) {
test<-nlsList(result~a+(b-a)/(1+(conc/(c+z*cdiff))^d)
|rep,start=dat$init,data=dat$mixeddat)
return(nlme(test,random=b~1))
}
testfunc()
then I get the error message
Error in eval(expr, envir, enclos) : Object "result" not found
Any help would be appreciated