Question: Using R, generate data and store it in the R variable x using the commands set.seed(3) x=rmul(100,p=5,mar.fun=ghdist,h=0.2,rho=0.7) x[,1]=rlnorm(100) This creates five random variables, the last
Using R, generate data and store it in the R variable x using the commands set.seed(3)
x=rmul(100,p=5,mar.fun=ghdist,h=0.2,rho=0.7)
x[,1]=rlnorm(100)
This creates five random variables, the last four of which have symmetric, heavytailed distributions with a common correlation of 0.7. The first variable has a skewed distribution with relatively light tails and is independent of the other four variables. Use regpca to perform the classic PCA and verify that for two and three components, the cumulative proportion of variances are 0.824 and 0.893, respectively, suggesting that two or three components are needed to capture the variability in the data.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
