Basic class to implement a Sequential Monte Carlo sampler.

Code: N lW_update logLik logWeights mcmc_move p_margin p_move particles resampleC unifWeights Inherited: particles logWeights unifWeights p_move mcmc_move lW_update logLik resampleC N Docs: Particles codep_margin: lW_update logWeights mcmc_move p_move resampleC unifWeights

`particles`

:Matrix with particle values

`p_margin`

:Integer indicating which margin in the matrix represents particle ids

`logWeights`

:Vector containing the log (unnormalised) particle weights.

`unifWeights`

Logical indicating whether the logWeights are uniform.

`p_move`

:Function to move the particles to a new position.

`mcmc_move`

:Function to perform a Monte Carlo Markov Chain move.

`lW_update`

:Function to do update the

`logWeights`

.`resampleC`

:Numeric value (between 0 and 1) indicating when to perform resampling.

- particles
`signature(object = "ParticleMatrix")`

: return particles- particles<-
`signature(object = "ParticleMatrix")`

: set particles- ParticleMove
`signature(object = "ParticleMatrix")`

: move particles

#

- doParticleMove
`signature(object = "ParticleMatrix")`

: move particles- SmcIterate
`signature(object = "ParticleMatrix")`

: do a full SMC iteration

#

- doSmcIterate
`signature(object = "ParticleMatrix")`

: move particles- UpdateWeights
`signature(object = "ParticleMatrix")`

: calculate updated weights

#

- doUpdateWeights
`signature(object = "ParticleMatrix")`

: move particles- ESS
`signature(object = "ParticleMatrix")`

: effective sample size- logWeights
`signature(object = "ParticleMatrix")`

: return log weights- logWeights<-
`signature(object = "ParticleMatrix")`

: set log weights- getWeights
`signature(object = "ParticleMatrix")`

: return the unnormalized weights- getNormWeights
`signature(object = "ParticleMatrix")`

: return the self-normalized weights- mean
`signature(object = "ParticleMatrix")`

: return the estimated mean of each particle dimension- var
`signature(object = "ParticleMatrix")`

: return the estimated variance of each particle dimension- cov
`signature(object = "ParticleMatrix")`

: return the estimated covariance matrix of the particle dimensions

Maarten Speekenbrink

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.