densityMvNorm: Multivariate Normal Density

Description Usage Arguments Details Value

Description

Calculates mutlivariate normal densities. This is different to the dmvnorm function in the mvtnorm package in that it takes a matrix for both x and mean. It then calculates a vector of densities according to dmvnorm(x[i,],mean[i,],sigma,log = FALSE). To aid computation the mahalanobis distances are calculated in parallel using mclapply.

Usage

1

Arguments

x

A matrix of values

mean

A matrix of means

sigma

A covariance matrix

log

Boolean for whether we want log densities or not

Details

My own implementation of the multivariate normal density function for increased efficiency for application in this package because there are so many repeated calls to densitymvnorm using a given sigma matrix it made sense to have one that could take a matrix of means as well as a matrix of x's and treat them as paired, returning the density of x[1,] given mean[1,], x[2,] given mean[2,] also stops repeated inversions of the matrix sigma, and calculates the densities in parallel

Value

A vector of densities


csgillespie/abcpmcmc documentation built on May 14, 2019, 12:11 p.m.