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: #Error in numericDeriv(form[[3L]], names(ind), env) : # Missing value or an infinity produced when evaluating the model 1: In min (x) found no arguments to min; Inf is returned #it is my translation 2: In max (x): no arguments to max;-Inf is returned - Please where is the problem? - What I can do to obtain R^2? - The way 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-model-with-decreasing-tp3747572p3747572.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.