Displaying 1 result from an estimated 1 matches for "wssr".
Did you mean:
wss
2008 Oct 08
0
genoud nonlinear least squares optimisation
...e if my results will improve, and also out of
personal interest. However the problem I am having is, if I have a set of
'best-fit' parameters (a,b,c) and corresponding variables (X1,X2,X3) for my
function, how does one supply the variables to the function that is
optimised in genoud?
i.e.
WSSR <- function(B,D) {
a<-B[1]
b<-B[2]
c<-B[3]
Y <- D[1]
X1 <- D[2]
X2 <- D[3]
X3 <- D[4]
chi2 = (Y - a*X1+b*X2-c*X3)^2
return(chi2)
}
genoud(WSSR, nvars=3, pop.size=5000, max=FALSE)
Genoud optimises the first variable (in this case the vector B) supplied to
the function, h...