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

Description Usage Arguments Value

View source: R/sampling.R

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

1
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 Feb. 17, 2021, 9:07 a.m.