开始使用免费开始使用

Generate samples from multivariate t-distribution

Though multivariate normal is widely used, not all multivariate data follow a normal distribution. Multivariate t-distributions can accommodate heavy-tailed distribution in each direction. In this exercise, you will learn how to draw random samples from a multivariate t-distribution. We will use the same mu.sim and sigma.sim parameters that were used to generate samples from multivariate normal distributions.

本练习是课程的一部分

Multivariate Probability Distributions in R

查看课程

练习说明

  • Generate 200 samples from a bivariate t-distribution with 5 degrees of freedom. Label the object multt.sample.
  • Print the first six samples.
  • Check whether the samples follow a multivariate normal distribution using the Mardia Test and plot the relevant qqplot for the test.

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Generate the t-samples 
multt.sample <- ___

# Print the first 6 samples


# Check multivariate normality
mvn(___, mvnTest = "___", multivariatePlot = "___")
编辑并运行代码