[R] Adjust Richards model with nlme

raphael fernandes raphaelfsa89 at yahoo.com.br
Tue Jan 19 12:20:58 CET 2016


Hello everyone,

I have tried to adjust the non linear Richards growth model with this script:

richards <- function(x,beta1,beta2,beta3,beta4)
    beta1*(1-beta2*exp(-x*beta3))^beta4
richards <- deriv(~beta1*(1-beta2*exp(-x*beta3))^beta4,c("beta1","beta2","beta3","beta4"),function(x,beta1,beta2,beta3,beta4){})
FF.richards <- nls(Peso~richards(Idade,beta1,beta2,beta3,beta4),data=femeas,start=c(beta1=370,beta2=9.7,beta3=272,beta4=0.00003))

but I receive the follow error:

Erro em qr.default(.swts * attr(rhs, "gradient")) : 
NA/NaN/Inf em chamada de função externa (argumento 1)
Além disso: Mensagens de aviso perdidas:
In log(.expr5) : NaNs produzidos

What can I do to fix it?

	[[alternative HTML version deleted]]



More information about the R-help mailing list