Description Usage Arguments Value Examples
This function evaluates the truncated univariate Gaussian density using an important sampling procedure as the normalizing constant
1 | dtmvnormImportSampling(X, mn, sig, constr, numSamp = 1e+06)
|
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 of the density
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.