View source: R/importance_sampling_functions.R
resample_particle_y_samples | R Documentation |
Resamples the particle set for the samples for y
resample_particle_y_samples( N = particle_set$N, particle_set, multivariate, resampling_method = "multi", seed = NULL )
N |
number of samples (default is particle_set$N) |
multivariate |
logical value indicating if the particles are multivariate (TRUE) or not (FALSE) |
resampling_method |
method to be used in resampling, default is multinomial resampling ('multi'). Other choices are stratified resampling ('strat'), systematic resampling ('system'), residual resampling ('resid') |
seed |
seed number - default is NULL, meaning there is no seed |
resampled particle set. Returns the same set if it has already been resampled
particles <- create_particle(samples = rnorm(10, 0, 1), multivariate = FALSE) particles <- resample_particle_y_samples(particle_set = particles, multivariate = FALSE, resampling_method = 'resid', seed = 21)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.