search for: fm6

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

Did you mean: fc6
2012 Dec 16
1
nls for sum of exponentials
...y ~ Ae^(-md) + B e^(-nd) + c the model has 5 parameters A, b, m, n, c I am using nls to fit the data and I am using DEoptim package to pick the most optimal start values - fm4 <- function(x) x[1] + x[2]*exp(x[3] * -dist) + x[4]*exp(x[5] * -dist) fm5 <- function(x) sum((wcorr-fm4(x))^2) fm6 <- DEoptim(fm5, lower=c(0,0.1,1,0.1,1), upper=c(10e7, 100, 300,100, 300 ), control=list(trace=FALSE)) par2 <- fm6$optim$bestmem names(par2) <- c("c", "A", "n1", "B", "n2") fit2 <- nls(wcorr ~ (c + A*exp(n1 * -dist) + B*exp(n2 * -dist)...