search for: ftestnls

Displaying 1 result from an estimated 1 matches for "ftestnls".

2013 Jan 02
1
Need help with self-defined function to perform nonlinear regression and get prediction interval
...ed this problem with all the other self-defined functions, only this one, so I doubt it is caused by something in the nls2 package. I attached my main program and the function as follows. Thank you all in advance. # Main program rm(list=ls()) x <- c(0,1,3,4,5,2,10,4,6,8,7) y <- seq(0,10,1) ftestnls(x,y) # Call the function # function 'ftestnls(v1,v2)' # v1 <- x # v2 <- y ftestnls <- function(v1,v2){ datalist <- list(v1=v1,v2=v2) startvalues <- list(a0=v1[1],a1=0,a2=0) # Perform nonlinear regression require(nls2) nlsmodel <- nls(v1~a0 + a1*v2 + a2 *sin(2...