search for: sm08b

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

2008 May 07
3
function in nls argument
Greetings R users, maybe there is someone who can help me with this problem: I define a function "optim.fun" and want as output the sum of squared errors between predicted and measured values, as follows: optim.fun <- function (ST04, SM08b, ch2no, a, b, d, E) { predR <- (a*SM08b^I(2)+b*SM08b+d)*exp(E*((1/(283.15-227.13))-(1/(ST04+273.15-227.13)))) abserr <- abs(ch2no-predR) qnum <- quantile(abserr, probs=0.95, na.rm=T) is.na(abserr) <- (abserr > qnum) errsq <-...