Displaying 1 result from an estimated 1 matches for "vangen".
Did you mean:
hangen
2005 Sep 26
2
nls and na/Nan/Inf error
...below according to the logist example in Ch8 of Pinheiro & Bates. I am
getting the following error (R version 2.1.1)
*Error in qr(attr(rhs, "gradient")) : NA/NaN/Inf in foreign function
call (arg 1)*
Below is the function and data.
/# the van genuchten moisture release function
vanGen <- function(x, Vr, Vm, alpha, lamda) {
if (Vr < 0) Vr <- 0
Vr + (Vm - Vr)/((1+(alpha*x)^lamda)^(1-1/lamda))
}
vanGen <- deriv(~Vr + (Vm - Vr)/((1+(alpha*x)^lamda)^(1-1/lamda)),
c("Vr", "Vm", "alpha", "lamda"), function(x, Vr, Vm, alpha, la...