[R] nls.regression syntax problem

Kervahu Anne anne.kervahu at adria.tm.fr
Fri Feb 18 15:14:53 CET 2005


hi,
i try to apply a nls regression but i always have this error message
"Error in numericDeriv(form[[3]], names(ind), env) : 
        Missing value or an Infinity produced when evaluating the model"
i don't understand why it doesn't work

this is the programm that i run:

f <- function (x,p) {
u <- p[1]
v <- p[2]
w <- p[3]
(I((x*u)^v))+w    
}

x<-c(1:10)
y<-c(5,6,6.5,8,7,4,3,5,9,15)

r <- nls( y ~ f(x,c(a,b,d)), start=c(a=3, b=2.5, d=3) )

so, if you see a mistake can you contact me:

Anne KERVAHU
annekervahu at yahoo.fr




More information about the R-help mailing list