Two Error messages when fitting mixed effects nonlinear model in nlme
Question
Here is my code:
> pred4<-function(a1,b1,a3,b3,Pa,Temp,D) log(Pa)+a1+b1*(1000/(Temp+273.15) - 0.81)-log(1+Pa*exp(a3+b3*(1000/(Temp+273.15) - 0.81)))+D
> nlme.fit <- nlme(ln.R. ~ pred4(a1,b1,a3,b3,Pa,Temp,Day), fixed = a1+b1+a3+b3 ~1,random = D~1|Day, data =Dat4param, start=start0)
nlme fits the nonlinear model fine if I remove the random Day effect D. However, the above code results in the following error and repeated warnings:
Error in chol.default((value + t(value))/2) :
the leading minor of order 1 is not positive definite
In addition: Warning messages:
1: In Ops.factor(log(Pa) + a1 + b1 * (1000/(Temp + 273.15) - 0.81) - :
+ not meaningful for factors
2: In Ops.factor(log(Pa) + a1 + b1 * (1000/(Temp + 273.15) - 0.81) - :
+ not meaningful for factors
etc.
Any suggestions??
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow