[R] Any help
Spencer Graves
spencer.graves at pdf.com
Fri Feb 6 15:47:38 CET 2004
It looks like "nls" may have tested something like q = 0, for
which IFOXM is (-Inf), provided the other numbers are sensible.
With problems like this, before I invoke "nls", I study the
formula and evaluate it with all the different combinations of arguments
that might produce NA or Inf. If I find a value unacceptable to "nls",
I change the parameterization to eliminate it. For example, if r, q and
K must be positive, then I replace them with log.r, log.q, and log.K.
hope this helps. spencer graves
Ivone Figueiredo wrote:
> Hi could anyone help me how to bypass this problem
>
> IFOXM <- function(r, q , K) { (2*r*log(q*K))/(2+r)+((2-r)/(2+r))*
>
> v1
>
> -(q/(2+r))* v2}
>
> v3 <- IFOXArist$Ln.Ut.1
>
> IFOXMArist <- nls(v3~ IFOXM (r, q , K),start=list(r=0.5, q=0.01,
>
> K=2000))
>
>Error in numericDeriv(form[[3]], names(ind), env) :
>
>Missing value or an Infinity produced when evaluating the
>
> model In addition: Warning message: NaNs produced in: log(x)
>
>
>
> Regards
>
>
>
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>
More information about the R-help
mailing list