Displaying 3 results from an estimated 3 matches for "wcorr".
Did you mean:
xcorr
2012 Dec 16
1
nls for sum of exponentials
...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...
2011 Jun 15
1
Print the summary of a model to file
Hi there,
I am having a strange problem. I am running nls on some data.
#data
x <- -(1:100)/10
y <- 100 + 10 * (exp(-x / 2)
Using nls I fit an exponential model to this data and get a great fit
summary(fit)
Formula: wcorr ~ (Y0 + a * exp(m1 * -dist/100))
Parameters:
Estimate Std. Error t value Pr(>|t|)
Y0 -0.0001821 0.0002886 -0.631 0.528
a 0.1669675 0.0015223 109.678 <2e-16 ***
m1 10.8045840 0.1575957 68.559 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1...
2009 Feb 15
0
Kalman Filter - dlm package
...y over time and matches my case study described above.
data(NelPlo)
### multivariate local level -- seemingly unrelated time series
buildSu <- function(x) {
Vsd <- exp(x[1:2])
Vcorr <- tanh(x[3])
V <- Vsd %o% Vsd
V[1,2] <- V[2,1] <- V[1,2] * Vcorr
Wsd <- exp(x[4:5])
Wcorr <- tanh(x[6])
W <- Wsd %o% Wsd
W[1,2] <- W[2,1] <- W[1,2] * Wcorr
return(list(
m0 = rep(0,2),
C0 = 1e7 * diag(2),
FF = diag(2),
GG = diag(2),
V = V,
W = W))
}
suMLE <- dlmMLE(NelPlo, rep(0,6), buildSu); suMLE
buildSu(suMLE$par)[c("V","W")]
Thanking...