lnnormpdf: Compute the logarithm of the pdf of normal random variable...

Description Usage Arguments Value Author(s) Examples

Description

This function computes the logarithm of the density function for normal distribution with mean and covariance matrix

Usage

1

Arguments

x

normal random variable (vector)

u

mean vector of x

sigma

covariance matrix of x

Value

a real number representing the logarithm of pdf for x ~ N(u, sigma)

Author(s)

Pulong Ma <mpulong@gmail.com>

Examples

1
2
3
4
5
6
set.seed(1234)
n <- 10
x <- matrix(rnorm(n), nrow=n, ncol=1)
u <- matrix(rnorm(n), nrow=n, ncol=1)
sigma <- exp(-as.matrix(dist(rnorm(n))))
out <- lnnormpdf(x, u, sigma)

pulongma/DABayes documentation built on June 24, 2019, 12:38 a.m.