mvnpdf(x=matrix(1.96), mean=0, varcovM=diag(1), Log=FALSE)
mvnpdfC(x=matrix(1.96), mean=0, varcovM=diag(1), Log=FALSE)
mvnpdf(x=matrix(1.96), mean=0, varcovM=diag(1))
mvnpdfC(x=matrix(1.96), mean=0, varcovM=diag(1))
if(require(microbenchmark)){
library(microbenchmark)
microbenchmark(dnorm(1.96),
mvnpdf(x=matrix(1.96), mean=0, varcovM=diag(1), Log=FALSE),
mvnpdfC(x=matrix(1.96), mean=0, varcovM=diag(1), Log=FALSE),
times=10000L)
}else{
cat("package 'microbenchmark' not available\n")
}
Run the code above in your browser using DataLab