dtmvnormImportSampling: Truncated univariate Gaussian density

Description Usage Arguments Value Examples

Description

This function evaluates the truncated univariate Gaussian density using an important sampling procedure as the normalizing constant

Usage

1
dtmvnormImportSampling(X, mn, sig, constr, numSamp = 1e+06)

Arguments

X

a vector of observations where each column is the independent observations

mn

mean of the Gaussian density

sig

covariance matrix of the Gaussian density

constr

a function that describes the domain or constraint of the samples

numSamp

number of samples in the important sampling procedure

Value

value of the density

Examples

1
2
3
X <- rnorm(5, mean=0, sd=1)
constr <- function(X, u1 = lower, u2 = upper) { X >= u1 & X <= u2 }
dtmvnormImportSampling(X, mn, sig, constr, numSamp=1e6)

pasudyan/ConstrMixMod documentation built on May 10, 2019, 8:26 a.m.