The fifth assignment of Multivariate Statistics. The assignment is written in Rmarkdown, a smart syntax supported by RStudio helping with formula, plot visualization and plugin codes running.
The fifth assignment of Multivariate Statistics. The assignment is written in Rmarkdown, a smart syntax supported by RStudio helping with formula, plot visualization and plugin codes running.
most recommend:click here for html version of assignment, you can see codes as well as plots.
You may also find the PDF Version of this assignment from github. Or if you can cross the fire wall, just see below:
1
mp <- matrix(c(5,2,2,2),2,2,byrow=T) eigen(mp)
The eigenvalue-eigenvector pairs are λ1=6,e1=[52,51];λ2=1,e2=[−51,52].Therefore, the principle componenets become: Y1=e1TX=52X1+51X2Y1=e2TX=−51X1+52X2The total population variance explained by first principal component is:var(Y1)+var(Y2)var(Y1)=λ1+λ2λ1=1+66≈85.71%
2
a
cov2cor(mp)
The correlation matrix ρ=152521The eigenvalue-eigenvector pairs are λ1=55+10,e1=[2121]λ1=55−10,e1=[−2121]LetZi=σiiXi−μi,i=1,...,p.The principal components become:Y1=e1TZ=21Z1+21Z2Y1=e2TZ=−21Z1+21Z2The total population variance explained by first principal component is:var(Y1)+var(Y2)var(Y1)=λ1+λ2λ1=105+10≈81.6%
b
The principal components of Z obtained from the eigenvectors of the correlation matrix ρ of X is different from those calculated from covariance matrix Σ. Because the eigen pairs derived from Σ, in general not the same as the ones derived from ρ
From the summary above, the proportion of the total sample variance explained by the rst three principal components is: 89.881%. It means that the first three explain almost all variance.
c
From 8-33, we have the CI of m λi:
[1+z(α/2m)2/nλ^i,1−z(α/2m)2/nλ^i]
z <-qnorm(1-1/6)cical <-function(lambda){ c(lambda/(1+z*(1/103)**0.5),lambda/(1-z*(1/103)**0.5))}cical(0.0013676780)cical(0.0007011596) cical(0.0002538024)
The thirteenth assignment of Linear Regression. The assignment is written in Rmarkdown, a smart syntax supported by RStudio helping with formula, plot visualization and plugin codes running.
The fifth assignment of Multivariate Statistics. The assignment is written in Rmarkdown, a smart syntax supported by RStudio helping with formula, plot visualization and plugin codes running.
The fifth assignment of Multivariate Statistics. The assignment is written in Rmarkdown, a smart syntax supported by RStudio helping with formula, plot visualization and plugin codes running.
The fifth assignment of Multivariate Statistics. The assignment is written in Rmarkdown, a smart syntax supported by RStudio helping with formula, plot visualization and plugin codes running.