skewstudent | R Documentation |
Sampling and density evaluation for the multivariate skew-t distribution and copula.
rskewt(n, loc = rep(0, d), scale = diag(2), factor = NULL, gamma = rep(0, d), df = Inf, method = c("PRNG", "sobol", "ghalton"), skip = 0) dskewt(x, loc = rep(0, d), scale = diag(2), gamma = rep(0, d), df, log = FALSE, scale.inv, ldet) rskewtcopula(n, scale = diag(2), factor = NULL, gamma = rep(0, d), df = Inf, pseudo = TRUE, method = c("PRNG", "sobol", "ghalton"), skip = 0) dskewtcopula(u, scale = diag(2), gamma = rep(0, d), df, log = FALSE, scale.inv, ldet)
u |
(n, d)- |
x |
(n, d)- |
n |
sample size n (positive integer). |
df |
positive degress of freedom; can also be |
loc |
location of length d. |
gamma |
Skewness-vector of dimension d; if |
scale |
scale matrix (a covariance matrix entering the
distribution as a parameter) of dimension (d, d) (defaults to
d = 2). Note that |
factor |
(d, d)- |
scale.inv |
inverse of |
ldet |
|
log |
|
pseudo |
|
method |
see |
skip |
see |
Functionalities for sampling from the multivariate skew-t distribution
and copula; the former has stochastic representation μ + Wγ + √{W}AZ
where AA^T=scale, W follows an inverse-gamma distrubution with
parameters df/2
and is independent of the d-dimensional vector Z
following a standard multivariate normal distribution. When gamma is the
null-vector, the distribution becomes the multivariate t distribution.
A major computational challenge when working with the skew t copula is
the lack of an available distribution and quantile function of the univariate
skew t distribution. These are required in rskewtcopula(, pobs = FALSE)
and in dskewtcopula()
. The unviarate skew t distribution and
quantile functions are currently implemented as described Yoshiba, T. (2018).
The functions described here are currently being further developed to improve
stability, accuracy and speed, so that arguments may change in subsequent
versions of nvmix
.
n-vector of (log-)density values and (n, d)-matrix of samples, respectively.
Erik Hintz, Marius Hofert and Christiane Lemieux
Hintz, E., Hofert, M. and Lemieux, C. (2020), Grouped Normal Variance Mixtures. Risks 8(4), 103.
Hintz, E., Hofert, M. and Lemieux, C. (2021), Normal variance mixtures: Distribution, density and parameter estimation. Computational Statistics and Data Analysis 157C, 107175.
Hintz, E., Hofert, M. and Lemieux, C. (2022), Multivariate Normal Variance Mixtures in R: The R Package nvmix. Journal of Statistical Software, doi: 10.18637/jss.v102.i02.
McNeil, A. J., Frey, R. and Embrechts, P. (2015). Quantitative Risk Management: Concepts, Techniques, Tools. Princeton University Press.
Yoshiba, T. (2018). Maximum Likelihood Estimation of Skew-t Copulas with Its Applications to Stock Returns. Journal of Statistical Computation and Simulation 88 (13): 2489–2506.
rStudent()
, dStudent()
, rStudentcopula()
, dStudentcopula()
## Sampling from the skew-t copula n <- 100 # sample size d <- 10 # dimension rho <- 0.5 scale <- matrix(rho, ncol = d, nrow = d) diag(scale) <- 1 # scale gamma <- rep(1, d) # skewness df <- 7 # degrees-of-freedom parameter set.seed(1) # same random numbers for both runs system.time(samplecop_pobs <- rskewtcopula(n, scale = scale, gamma = gamma, df = df, pseudo = TRUE)) set.seed(1) system.time(samplecop_pskewt <- rskewtcopula(n, scale = scale, gamma = gamma, df = df, pseudo = FALSE)) ## Plot first two coordinates layout(rbind(1:2)) plot(samplecop_pobs, xlab = expression(U[1]), ylab = expression(U[2])) mtext("pobs = TRUE") plot(samplecop_pskewt, xlab = expression(U[1]), ylab = expression(U[2])) mtext("pobs = FALSE") layout(1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.