gen_particles: Generate proposal particles

View source: R/sampling.R

gen_particlesR Documentation

Generate proposal particles

Description

Generates particles for the new_sample function

Usage

gen_particles(
  num_particles,
  mu,
  sig2,
  particle,
  ...,
  mix_proportion = c(0.5, 0.5, 0),
  prop_mu = NULL,
  prop_sig2 = NULL,
  epsilon = 1
)

Arguments

num_particles

The total number of particles to generate using a combination of the three methods.

mu

A vector of means for the multivariate normal

sig2

A covariate matrix for the multivariate normal

particle

A particle (re proposals for latent variables)

mix_proportion

A vector of floats between 0 and 1 and summing to 1 which give the proportion of particles to generate from the population level parameters, the individual random effects and the conditional parameters respectively

epsilon

Reduce the variance for the individual level samples by this factor

Details

Generate particles for a particular subject from a mix of population level (hierarchical) distribution, from the particles (containing individual level distribution) and/or from the conditional on accepted individual level particles, a more efficient proposal method.

This function is used in burnin, adaptation and sampling using various combinations of the arguments.

Value

The new proposals


pmwg documentation built on May 29, 2024, 12:09 p.m.