search for: ssexample

Displaying 2 results from an estimated 2 matches for "ssexample".

Did you mean: asexample
2009 Sep 21
1
How to use nls when [selfStart] function returns NA or Inf??
...value or an infinity produced when evaluating the model or (if I provide a gradient attribute) Error in qr.default(.swts * attr(rhs, "gradient")) : NA/NaN/Inf in foreign function call (arg 1) A toy example demonstrating my problem (legal values of param are >1): #----------- SSexample<-selfStart( model=function(x, param) x^log(param-1), initial = function(mCall, data, LHS){ val<- 1.001 names(val) <- mCall[c("param")] val }, parameters=c("param") ) #---------------- nls(y~SSexample(x, par), data=data.frame(x=1:10,y=rnorm(10))) #--------...
2009 Sep 04
1
How should a SelfStart function handle illegal parameter values?
Hi Everyone, I'm trying to write selfStart non-linear models for use with nls. In these models some combinations of parameter values are illegal; the function value is undefined. That's OK when calling the function directly [e.g. SSmodel(x, pars...)]; I return an appropriate non-value such as NA or Inf. However, when called from nls [e.g. nls(y~SSmodel(x, pars...), ...)] those