calibrate_smc: Calibrate the number of particles for a SMC

Description Usage Arguments Value Note

Description

This function allows you to optimize the number of particles in your SMC. It displays how the variance and the mean of the likelihood estimator change with increasing number of particles. The idea is then to select an intermediate number of particles such that the estimator is stable, thus saving further computation burden in your PMCMC.

Usage

1
calibrate_smc(ssm, n_parts, n_replicates, plot = TRUE, ...)

Arguments

ssm

a ssm object, returned by new_ssm.

n_parts

numeric vector containing the number of particles to test.

n_replicates

for each value of n_parts, the number of replicates. The higher the more accurate the estimatation of the variance but it will take longer to compute.

plot

logical, if TRUE (default) the function will print 2 diagnostic plots.

...

other parameters to be passed to SMC.

Value

a list of 3 elements:

Note

This function will always run an SMC with PSR approximation since it's the only situation where you will be interested in calibrating the number of particles.


StateSpaceModels/ssminr documentation built on Feb. 7, 2020, 8:20 p.m.