Description Arguments Details Value Usage Author(s) References Examples
Density, distribution function and random generation for the multivariate truncated Student distribution
with location vector mu
, scale matrix sigma
, lower truncation limit
lb
, upper truncation limit ub
and degrees of freedom df
.
n |
number of observations |
x, q |
vector or matrix of quantiles |
B |
number of replications for the (quasi)-Monte Carlo scheme |
log |
logical; if |
mu |
vector of location parameters |
sigma |
scale matrix |
df |
degrees of freedom |
lb |
vector of lower truncation limits |
ub |
vector of upper truncation limits |
type |
string, either of |
The truncation limits can include infinite values. The Monte Carlo (type = "mc"
) uses a sample of size B
, while the
qausi Monte Carlo (type = "qmc"
) uses a pointset of size ceiling(n/12)
and estimates the relative error using 12 independent randomized QMC estimators.
pmvt
computes an estimate and a deterministic upper bound of the distribution function of the multivariate normal distribution.
Infinite values for vectors u and l are accepted. The Monte Carlo method uses sample size n: the larger n, the smaller the relative error of the estimator.
dtmvt
gives the density, ptmvt
gives the distribution function, rtmvt
generate random deviates.
1 2 3 4 |
Leo Belzile, R port from Matlab code by Z. I. Botev
Z. I. Botev and P. L'Ecuyer (2015), Efficient probability estimation and simulation of the truncated multivariate Student-t distribution, Proceedings of the 2015 Winter Simulation Conference, pp. 380-391
1 2 3 4 5 6 | d <- 4; lb <- rep(0, d)
mu <- runif(d)
sigma <- matrix(0.5, d, d) + diag(0.5, d)
samp <- rtmvt(n = 10, mu = mu, sigma = sigma, df = 2, lb = lb)
loglik <- dtmvt(samp, mu = mu, sigma = sigma, df = 2, lb = lb, log = TRUE)
cdf <- ptmvt(samp, mu = mu, sigma = sigma, df = 2, lb = lb, log = TRUE, type = "q")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.