Actually it just the parameterization that is causing trouble near k=0
let u = (x-z)/a
then the problematic part of your function is
(1- k*u)^(1/k)
take the log to get
log(1-k*u)/k
= -(k*u +k^2*u^2/2 + ...)/k
= -(u +k u^2/2 + ..)
so your function is exp(-u - ku^2/2 - ...)
and u
Hi Ezra,
I'm not any sort of expert on this but my own attempts to get nls to
fit functions similar in form to your kappa equation have usually
provoked the same error messages.
It might be worth log transforming your dependent variable and trying
to fit this:
-log(h) * ( -log(k) * log(1 - h *
Hi Everyone,
I am trying to use NLS to fit a dataset using a Kappa function, but I am
having problems. Depending on the start values that I provide, I get
either:
Error in numericDeriv(form[[3L]], names(ind), env) :
Missing value or an infinity produced when evaluating the model
Or
Error in nl
3 matches
Mail list logo