particle_draws: Generate a cloud of particles from a multivariate normal...

View source: R/sampling.R

particle_drawsR Documentation

Generate a cloud of particles from a multivariate normal distribution

Description

Takes the mean and variance for a multivariate normal distribution, as well as the number of particles to generate and return random draws from the multivariate normal if the numbers of particles is > 0, otherwise return NULL. At least one of mean or sigma must be provided.

Usage

particle_draws(n, mu, covar)

Arguments

n

number of observations

mu

mean vector

covar

covariance matrix

Value

If n > 0 returns n draws from the multivariate normal with mean and sigma, otherwise returns NULL


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