mmvtpdfC {NPflow} | R Documentation |
C++ implementation of multivariate Normal probability density function for multiple inputs
Description
C++ implementation of multivariate Normal probability density function for multiple inputs
Usage
mmvtpdfC(x, mean, varcovM, df, Log = TRUE)
Arguments
x |
data matrix of dimension |
mean |
mean vectors matrix of dimension |
varcovM |
list of length |
df |
vector of length |
Log |
logical flag for returning the log of the probability density
function. Defaults is |
Value
matrix of densities of dimension K x n
.
Author(s)
Boris Hejblum
Examples
mvnpdf(x=matrix(1.96), mean=0, varcovM=diag(1), Log=FALSE)
mvtpdf(x=matrix(1.96), mean=0, varcovM=diag(1), df=10000000, Log=FALSE)
mmvtpdfC(x=matrix(1.96), mean=matrix(0), varcovM=list(diag(1)), df=10000000, Log=FALSE)
mvnpdf(x=matrix(1.96), mean=0, varcovM=diag(1))
mvtpdf(x=matrix(1.96), mean=0, varcovM=diag(1), df=10000000)
mmvtpdfC(x=matrix(1.96), mean=matrix(0), varcovM=list(diag(1)), df=10000000)
mvtpdf(x=matrix(1.96), mean=0, varcovM=diag(1), df=10)
mmvtpdfC(x=matrix(1.96), mean=matrix(0), varcovM=list(diag(1)), df=10)
if(require(microbenchmark)){
library(microbenchmark)
microbenchmark(mvtpdf(x=matrix(1.96), mean=0, varcovM=diag(1), df=1, Log=FALSE),
mmvtpdfC(x=matrix(1.96), mean=matrix(0), varcovM=list(diag(1)),
df=c(1), Log=FALSE),
times=10000L)
}else{
cat("package 'microbenchmark' not available\n")
}
[Package NPflow version 0.13.5 Index]