particle_draws {pmwg}R 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


[Package pmwg version 0.2.7 Index]