gen_particles | R Documentation |

Generates particles for the `new_sample`

function

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

`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 |

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.

The new proposals

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.