Description Usage Arguments Value References
This function uses the sequential importance sampling method to deal with a target with passive sonar for smoothing.
1 | Sstep.Smooth.Sonar(mm, xxt, xxt1, ww, vv, par)
|
mm |
the Monte Carlo sample size |
xxt |
the sample in the last iteration. |
xxt1 |
the sample in the next iteration. |
ww |
|
vv |
|
par |
a list of parameter values. |
The function returns a list with the following components:
xx |
the new sample. |
logww |
the log weights. |
s2 <- 20 #second sonar location at (s2,0) q <- c(0.03,0.03) r <- c(0.02,0.02) nobs <- 200 start <- c(10,10,0.01,0.01) H <- c(1,0,1,0,0,1,0,1,0,0,1,0,0,0,0,1) H <- matrix(H,ncol=4,nrow=4,byrow=TRUE) W <- c(0.5*q[1], 0,0, 0.5*q[2],q[1],0,0,q[2]) W <- matrix(W,ncol=2,nrow=4,byrow=TRUE) V <- diag(r) mu0 <- start SS0 <- diag(c(1,1,1,1))*0.01 simu_out <- simPassiveSonar(nobs,q,r,start,seed=20) yy <- simu_out$yy resample.sch <- rep(1,nobs) xdim <- 4;ydim <- 2; mm <- 5000 par <- list(H=H,W=W,V=V,s2=s2) xx.init <- mu0+SS0 out.s5K <- SMC.Smooth(Sstep.Sonar,Sstep.Smooth.Sonar,nobs,yy,mm,par, xx.init,xdim,ydim,resample.sch)
Tsay, R. and Chen, R. (2019). Nonlinear Time Series Analysis. Wiley, New Jersey.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.