gen_particles: Generate proposal particles

Description Usage Arguments Details Value

View source: R/sampling.R

Description

Generates particles for the new_sample function

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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 Feb. 17, 2021, 9:07 a.m.