[R] exponential with decreasing

Komine momadou at yahoo.fr
Tue Aug 16 16:48:04 CEST 2011


Hi everybody, 
I try to do an exponential model with decreasing. In my data, there is no
data missing but there negative values. I adapted this following code whose
the origin code comes from in this forum:

Regress<-read.table("C:\\Users\\Regression.csv",sep=";",dec=",",header=TRUE) 
Regress
f <- function(x,a,b) {a * exp(b * x)} 
x<-Regress$EWT
y<-Regress$MSI7
plot(y ~ x) 
fm <- nls(y ~ f(x,a,b), data =Regress, start = c(a=1, b=1)) 
co <- coef(fm) 
curve(f(x, a=co[1], b=co[2]), add = TRUE)

But in the line 7, it blocks with the following message:

Erreur dans numericDeriv(form[[3L]], names(ind), env) : 
  Valeur manquante ou infinie obtenue au cours du calcul du modèle
De plus : Messages d'avis :
1: In min(x) : aucun argument trouvé pour min ; Inf est renvoyé
2: In max(x) : aucun argument pour max ; -Inf est renvoyé

-	Please where is the problem?
-	What I can do to obtain R^2?
- Is the method to verify homoscedasticity and normality is the same for
linear model?
Thank you in advance 
KOMINE 


--
View this message in context: http://r.789695.n4.nabble.com/exponential-with-decreasing-tp3747441p3747441.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list