# Some Statistical Aspects of the Truncated Multivariate Skew-\(t\) Distribution
## 4 Random Vector Generation  
Simulations of truncated multivariate distributions have been widely used in various fields of statistics. This section deals with the random vector generation from the truncated multivariate skew-\(t\) distribution. Our proposal is based on the rejection sampling method, which can be extended to unnormalized PDFs avoiding the computation of normalizing constants ([PERSON] and [PERSON] [28] Prop. 1). Let \(A\subseteq\mathbb{R}^{p}\) be a measurable set. Define the functions  
\[\tilde{f}(\mathbf{y})=t_{p}(\mathbf{y};\mathbf{\xi},\mathbf{\Omega},\
u)T\Big{(}\Big{[}\frac{ \
u+p}{\
u+\delta_{\mathbf{\Omega}}(\mathbf{y},\mathbf{\xi})}\Big{]}^{1/2}\mathbf{\alpha}^{ \prime}\mathbf{\omega}^{-1}(\mathbf{y}-\mathbf{\xi});\
u+p\Big{)},\quad\mathbf{y}\in A, \tag{17}\]  
and  
\[\tilde{g}(\mathbf{y})=\frac{t_{p}(\mathbf{y};\mathbf{\xi},\mathbf{\Omega},\
u)}{\int_{A}t_{p} (\mathbf{y};\mathbf{\xi},\mathbf{\Omega},\
u)\,\mathrm{d}\mathbf{y}},\quad\mathbf{y}\in A. \tag{18}\]  
Note that (17) corresponds to the kernel of the PDF of the truncated multivariate skew-\(t\) distribution. The expression (18) is the PDF of the truncated multivariate \(t\) distribution with support \(A\), which can be obtained from (7) when \(\mathbf{\alpha}=\mathbf{0}\). It is straightforward to show that  
\[\tilde{f}(\mathbf{y})\leq\tilde{g}(\mathbf{y}),\quad\mathbf{y}\in A.\]  
A study on the generation of random samples from the truncated multivariate \(t\) distribution appear in [PERSON] [29]. In a more general approach, [PERSON] and [PERSON] [7] proposed an algorithm based on Gibbs sampling for the generation of random vectors of the truncated elliptical distributions with rectangular support. The generation of a random vector from the truncated multivariate skew-\(t\) distribution is carried out through the following steps:  
1. Generate \(\mathbf{y}\) from a truncated multivariate \(t\) distribution with PDF \(\tilde{g}\) given in (18). 2. Generate \(u\) from a uniform distribution on \([0,1]\). If \(u\tilde{g}(\mathbf{y})\leq\tilde{f}(\mathbf{y})\), accept \(\mathbf{y}\); otherwise, go back to step 1. Figure 2 displays scatter plots of random samples of size 2000 generated from truncated bivariate skew-\(t\) distributions with rectangular supports. These scatter plots are overlaid with contours of the PDF (7) for different levels, namely \(f_{\mathbf{Y}}(\mathbf{y})=k\), where \(k=0.18,0.1,0.03,0.008,0.002\). The random sample of Figure 2 corresponds to a truncated bivariate \(t\) distribution with heavy tails (\(\mathbf{\alpha}=\mathbf{0}\) and small \(\
u\)), and that of Figure 2 corresponds to a truncated bivariate normal distribution (\(\mathbf{\alpha}=\mathbf{0}\) and large \(\
u\)). Figure 2c-e show skewed and heavy-tailed random samples generated from a truncated bivariate skew-\(t\) distribution with \(\mathbf{\alpha}\
eq\mathbf{0}\) and small \(\
u\). The random sample showed in Figure 2f was generated with the same parameter values as in Figure 2e, except \(\
u\), which is large; so we have a random sample from a truncated bivariate skew-normal distribution. It is noteworthy that the random samples generated from the truncated bivariate skew-\(t\) distributions with small \(\
u\) exhibit outliers in relation to those generated with large \(\
u\) (Figure 2a,b,e,f). Multivariate skewness is also evident in the random samples generated from the truncated bivariate skew-\(t\) distributions with \(\mathbf{\alpha}\
eq\mathbf{0}\) (Figure 2c-f). The plots suggest that the methodology to generate random vectors of the truncated multivariate skew-\(t\) distribution seems to be adequate. Figure 2: Scatter plots of simulated random samples overlaid with contour plots (at levels 0.18, 0.1, 0.03, 0.008, 0.002) of the PDF of \(\mathbf{Y}\sim\mathrm{TST}_{2}(\xi,\Omega,\mathbf{\alpha},\
u;R)\).