SMC {NTS} | R Documentation |
Generic Sequential Monte Carlo Method
Description
Function of generic sequential Monte Carlo method with delay weighting not using full information proposal distribution.
Usage
SMC(
Sstep,
nobs,
yy,
mm,
par,
xx.init,
xdim,
ydim,
resample.sch,
delay = 0,
funH = identity
)
Arguments
Sstep |
a function that performs one step propagation using a proposal distribution.
Its input includes |
nobs |
the number of observations |
yy |
the observations with |
mm |
the Monte Carlo sample size. |
par |
a list of parameter values to pass to |
xx.init |
the initial samples of |
xdim |
the dimension of the state variable |
ydim |
the dimension of the observation |
resample.sch |
a binary vector of length |
delay |
the maximum delay lag for delayed weighting estimation. Default is zero. |
funH |
a user supplied function |
Value
The function returns xhat
, an array with dimensions (xdim; nobs; delay+1)
,
and the scaled log-likelihood value loglike
. If loglike
is needed, the log weight
calculation in the Sstep
function should retain all constants that are related to
the parameters involved. Otherwise, Sstep
function may remove all constants
that are common to all the Monte Carlo samples. It needs a utility function
circular2ordinal
, also included in the NTS
package, for efficient memory management.
References
Tsay, R. and Chen, R. (2018). Nonlinear Time Series Analysis. John Wiley & Sons, New Jersey.
Examples
nobs= 100; pd= 0.95; ssw= 0.1; ssv= 0.5;
xx0= 0; ss0= 0.1; nyy= 50;
yrange= c(-80,80); xdim= 2; ydim= nyy;
mm= 10000
yr=yrange[2]-yrange[1]
par=list(ssw=ssw,ssv=ssv,nyy=nyy,pd=pd,yr=yr)
simu=simuTargetClutter(nobs,pd,ssw,ssv,xx0,ss0,nyy,yrange)
xx.init=matrix(nrow=2,ncol=mm)
xx.init[1,]=yrange[1]+runif(mm)*yr
xx.init[2,]=rep(0.1,mm)
resample.sch=rep.int(1,nobs)
out= SMC(Sstep.Clutter,nobs,simu$yy,mm,par,xx.init,xdim,ydim,resample.sch)