[R] France Model

Silvano silvano at uel.br
Fri May 4 16:41:21 CEST 2012


Hi,

I need fit the France model :

y = A{1 - exp[-b(t-T) - c(sqrt(t) - sqrt(T))]}

parameters: A, b, T, c
variable: t (time)
resp: y


I tried:
time = 1:48
resp = rnorm(48, 200, 10)

dados = data.frame(resp, time)
attach(dados)

f = function(x, A, b, T, c)
  A*(1-exp(-b*(x-T) - c*(sqrt(x) - sqrt(T))))

(mod1 = nls(resp~f(time, A, b, c, T), data=dados,
           start=c(A=500, b=152, c=100, T=100)))

but isn't work. The error is:

> (mod1 = nls(resp~f(tempo,A,b,c,T), data=dados,
+            start=c(A=10, b=152, c=10, T=10)))
Erro em numericDeriv(form[[3L]], names(ind), env) :
  Obtido valor faltante ou infinito quando avaliando o 
modelo

Somebody knows some package?

Thanks,

--------------------------------------
Silvano Cesar da Costa
Departamento de Estatística
Universidade Estadual de Londrina
Fone: 3371-4346



More information about the R-help mailing list