Learn R Programming

SMC (version 1.1)

common.1: The Common stuff for particleFilter, auxiliaryParticleFilter and sequentialMonteCarlo

Arguments

nStreams
integer $>$ 0.
nPeriods
integer $>$ 0.
dimPerPeriod
integer $>$ 0.
resampCriterionFunc
function of four arguments (currentPeriod, currentStreams, currentLogWeights, ...).
resampFunc
function of four arguments (currentPeriod, currentStreams, currentLogWeights, ...).
summaryFunc
function of four arguments (currentPeriod, currentStreams, currentLogWeights, ...).
nMHSteps
integer $\ge$ 0.
MHUpdateFunc
function of six arguments (currentPeriod, nMHSteps, currentStreams, lag1Streams, lag1LogWeights, ...).
nStreamsPreResamp
integer $>$ 0.
returnStreams
logical.
returnLogWeights
logical.
verboseLevel
integer, a value $\ge$ 2 produces a lot of output.

Value

  • This function returns a list with the following components:
  • drawsa list with the following components: summary, propUniqueStreamIds, streams, logWeights, acceptanceRates. See the section Note for more details.
  • nStreamsthe nStreams argument.
  • nPeriodsthe nPeriods argument.
  • dimPerPeriodthe dimPerPeriod argument.
  • nStreamsPreResampthe nStreamsPreResamp argument.
  • nMHStepsthe nMHSteps argument.
  • timethe time taken by the run.

Warning

Using very small values ($\le$ 1e3) for nStreams might not give reliable results.

Details

We introduce the following terms, which will be used in the sections Required Function and Optional Function below:

[object Object],[object Object]