View source: R/unbiased_estimators.R
stratified_estimator | R Documentation |
Estimates the score function using the unbiased stratified estimators of Vihola (2018)
stratified_estimator(
model,
theta,
observations,
nparticles,
resampling_threshold = 1,
coupled2_resampling,
coupled4_resampling,
initialization = "particlefilter",
algorithm = "CPF",
k = 0,
m = 1,
level_distribution,
nrepeats,
stratification
)
model |
a list representing a hidden Markov model, e.g. |
theta |
a vector of parameters as input to model functions |
observations |
a matrix of observations of size nobservations x ydimension |
nparticles |
number of particles |
resampling_threshold |
ESS proportion below which resampling is triggered (always resample at observation times by default) |
coupled2_resampling |
a 2-marginal coupled resampling scheme, such as |
coupled4_resampling |
a 4-marginal coupled resampling scheme, such as |
initialization |
choice of distribution to initialize chains, such as |
algorithm |
character specifying type of algorithm desired, i.e.
|
k |
iteration at which to start averaging (default to 0) |
m |
iteration at which to stop averaging (default to 1) |
level_distribution |
list containing mass_function and tail_function that specify the distribution of levels,
e.g. by calling |
nrepeats |
number of replicates to be stratified |
stratification |
type of stratification, such as |
a list with objects such as:
random_level
is a vector of random levels (of size nrepeats) to truncated infinite sum;
unbiasedestimator
is an unbiased estimator of the gradient of the log-likelihood;
cost
is the cost to compute the independent-sum estimator;
elapsedtime
is the time taken to compute the independent-sum estimator.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.