Re: [R] Custom nonlinear self starting function w/ 2 covariates

2010-07-13 Thread Sebastien Guyader
Dear all I finally found the way to do it. Nlme accepts simpler functions than selfStart: # Defining my function Myfun <-function(x1,x2,Tmax,Topt,B,E) { (((Tmax-x1)/(Tmax-Topt))*(x1/Topt)^(Topt/(Tmax-Topt)))*exp(-exp(B*(log(x2)-log(abs(E) } # Calling nlme nlmefit3 <- nlme( y ~ Myfun(x1,x2,T

[R] Custom nonlinear self starting function w/ 2 covariates

2010-07-12 Thread Sebastien Guyader
Hello, I'm trying to adjust a non linear model in which the biological response variable (ratio of germinated fungus spores) is dependent on 2 covariates (temperature and time). The response to temperature is modeled by a kind of beta function with 2 parameters (optimal and maximum temperatures)