You are on page 1of 23

Introduction to

Multivariate Analysis
CUCU SUMARNI-email: cucu@stis.ac.id
HP. 081573242676
Kompetensi Umum:
• memahami analisis data dengan banyak peubah secara simultan
• menerapkan dalam berbagai penggunaan

References: Sistem Penilaian:


Tugas/Kuis UTS
• Johnson, Richard A and Dean W. Wichern. 2002. Applied 10% 30%
Multivariate Statistical Analysis, fifth ed. Prentice-Hall, Inc. New
Jersey. Praktikum
30%
• Rencher, Alvin C and Christensen, William F. 2012. Methods of
Multivariate Analysis 3rd Edition. John Willey & sons, Inc. New
Jersey.
UAS
• Everitt B and Hothorn T. 2011. An Introduction to Applied of 30%
Multivariate Analysis with R. Springer. New York
• Hair Jr, Joseph F, et all. 1998. Multivariate Data Analysis, fifth ed.
Prentice-Hall, Inc. New Jersey.
Materials
Aspects of Multivariate
Analysis , Review Matrix
UTS Principal Component Analysis
Sample Geometry and
Random Sampling
Factor Analysis
Multivariate Normal
Distribution
Clustering Analysis
Inferences about Mean Vectors

Multivariate Analysis of
Variances (MANOVA):
One way & Two ways UAS Discriminant Analysis
Aspects of
Multivariate
Analysis
Why
Multivariate
Analysis?
• One unit/object has many variables
(characteristics) that may be
correlated each other
• Repeated Measurement
• Analysis of more than two
dependent variables
What is
Multivariate
Analysis?
About Multivariate Analysis
- Extensions of univariate analysis
- Examining relationships of more than two
variables
- Assumed to have multivariate normal
distribution
- Multivariate lies in the multiple combination
of variables

One Variate = Univariate :

𝑉𝑎𝑟𝑖𝑎𝑡𝑒 𝑣𝑎𝑙𝑢𝑒 = 𝑌 = 𝑤1 𝑋1 + 𝑤2 𝑋2 +…+ 𝑤𝑝 𝑋𝑝


Multivariate :
𝑌1 = 𝑤11 𝑋1 + 𝑤12 𝑋2 +…+ 𝑤1𝑝 𝑋𝑝
𝑌2 = 𝑤21 𝑋1 + 𝑤22 𝑋2 +…+ 𝑤2𝑝 𝑋𝑝
….
Multivariate Analysis in Statistical Terms

Multivariate analysis refers to all statistical


techniques that simultaneously analyze multiple
measurements on individuals or objects under
investigation.

Thus, any simultaneous analysis of more than two


variables can be loosely considered multivariate
analysis.
The Objectives of Multivariate Analysis

Descriptive :
1
(1), (2)
Data reduction or structural simplification

2
Sorting and grouping

3 Investigation of the dependence


Inferences : among variables
(3), (4), (5) Prediction
4
Hypothesis construction and testing
5
Classification of Can the variables be Dependency techniques
Yes
Multivariate Techniques divided into
independent and
dependent Interdependency
classifications based techniques
No
on some theory?
Single dependent
Variable
If they can, how many
variables are treated
as dependent in a Two or more
single analysis?

Metric (interval/ratio)
How are the variables,
both dependent and
independent, Non metric
(nominal/ordinal)
(Hair et all., 1998) measured?
12

Dependencies:
• Inferences about Mean Vectors
• MANOVA, MANCOVA
• Canonical correlation Analysis
• Discriminant Analysis

Interdependencies:
• Principal Component Analysis
• Factor Analysis
• Biplot, Correspondence Analysis
• Clustering Analysis
Multivariate
DATA
Structure
1 One unit/object has many variables
(multiple measurements)
Units Var-1 Var-2 Var-j Var-p
1 𝑦11 𝑦12 … 𝑦1𝑗 … 𝑦1𝑝
2 𝑦21 𝑦22 … 𝑦2𝑗 … 𝑦2𝑝
⋮ ⋮
𝑖 𝑦𝑖1 𝑦𝑖2 … 𝑦𝑖𝑗 … 𝑦𝑖𝑝
⋮ ⋮
n 𝑦𝑛1 𝑦𝑛2 … 𝑦𝑛𝑗 … 𝑦𝑛𝑝
2 Repeated Measurement
Units t Var-1 Var-2 Var-k Var-p
1 1 𝑦111 𝑦112 … 𝑦11𝑘 … 𝑦11𝑝
⋮ ⋮ ⋮ ⋮ ⋮
𝑛1 𝑦1𝑛1 1 𝑦1𝑛1 2 … 𝑦1𝑛1 𝑘 … 𝑦1𝑛1 𝑝
⋮ ⋮ ⋮ ⋮ ⋮ ⋮
𝑖 𝑗 𝑦𝑖𝑗1 𝑦𝑖𝑗2 … 𝑦𝑖𝑗𝑘 … 𝑦𝑖𝑗𝑝
⋮ ⋮ ⋮ ⋮ ⋮
𝑛𝑖 𝑦𝑖𝑛𝑖 1 𝑦𝑖𝑛𝑖 2 … 𝑦𝑖𝑛𝑖 𝑘 … 𝑦𝑖𝑛𝑖 𝑝

⋮ ⋮ ⋮ ⋮ ⋮ ⋮
𝑚 1 𝑦𝑚11 𝑦𝑚12 … 𝑦𝑚1𝑘 … 𝑦𝑚1𝑝
⋮ ⋮ ⋮ ⋮ ⋮
𝑛𝑚 𝑦𝑚𝑛𝑚 1 𝑦𝑚𝑛𝑚 2 … 𝑦𝑚𝑛𝑚 𝑘 … 𝑦𝑚𝑛𝑚 𝑝
3 More than Two Dependent Variables
Category of Units 𝒀 𝑿𝟏 𝑿𝟐 𝑿𝒌 𝑿𝒑
Y
1 1 𝑦11 𝑥111 𝑥112 … 𝑥11𝑘 … 𝑥11𝑝
⋮ ⋮ ⋮ ⋮ ⋮ ⋮
𝑛1 𝑦1𝑛1 𝑥1𝑛11 𝑥1𝑛12 … 𝑥1𝑛1𝑘 … 𝑥1𝑛1 𝑝
⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
𝑖 𝑗 𝑦𝑖𝑗 𝑥𝑖𝑗1 𝑥𝑖𝑗2 … 𝑥𝑖𝑗𝑘 … 𝑥𝑖𝑗𝑝
⋮ ⋮ ⋮ ⋮ ⋮ ⋮
𝑛𝑖 𝑦𝑖𝑛𝑖 𝑥𝑖𝑛𝑖 1 𝑥𝑖𝑛𝑖 2 … 𝑥𝑖𝑛𝑖 𝑘 … 𝑥𝑖𝑛𝑖 𝑝

⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
𝑚 1 𝑦𝑚1 𝑥𝑚11 𝑥𝑚12 … 𝑥𝑚1𝑘 … 𝑥𝑚1𝑝
⋮ ⋮ ⋮ ⋮ ⋮ ⋮
𝑛𝑚 𝑦𝑚𝑛𝑚 𝑥𝑚𝑛𝑚 1 𝑥𝑚𝑛𝑚 2 … 𝑥𝑚𝑛𝑚 𝑘 … 𝑥𝑚𝑛𝑚 𝑝
Descriptive
Statistics of
Multivariate Data
Descriptive Statistics
𝑥ҧ1
Sample means 𝑛
𝑥ҧ 1
vector ഥ = ⋮2
𝒙 𝑥𝑗ҧ = ෍ 𝑥𝑖𝑗 , 𝑗 = 1, … , 𝑝
𝑛
𝑥𝑝ҧ 𝑖=1

Sample Covariances 𝑛
Matrix 1 2
𝑠11 𝑠12 … 𝑠1𝑝 𝑠𝑗2 = 𝑠𝑗𝑗 = ෍ 𝑥𝑖𝑗 − 𝑥𝑗ҧ , 𝑗 = 1, … , 𝑝
𝑛
𝑠21 𝑠22 … 𝑠2𝑝 𝑖=1
𝑺𝑛 = ⋮ ⋮ ⋮
⋱ 𝑛
𝑠𝑝1 𝑠𝑝2 … 𝑠𝑝𝑝 1
𝑠𝑗𝑘 = ෍ 𝑥𝑖𝑗 − 𝑥𝑗ҧ 𝑥𝑖𝑘 − 𝑥ҧ𝑘 , 𝑗, 𝑘 = 1, … , 𝑝; 𝑗 ≠ 𝑘
𝑛
𝑖=1
Sample Correlations
Matrix 1 𝑟12 … 𝑟1𝑝 𝑠𝑗𝑘 σ𝑛𝑖=1 𝑥𝑖𝑗 − 𝑥𝑗ҧ 𝑥𝑖𝑘 − 𝑥ҧ𝑘
𝑟 1 … 𝑟2𝑝 𝑟𝑗𝑘 = = ,
𝑹 = 21

𝑠𝑗𝑗 𝑠𝑘𝑘
σ𝑛𝑖=1 𝑥𝑖𝑗 − 𝑥𝑗ҧ
2
σ𝑛𝑖=1 𝑥𝑖𝑘 − 𝑥ҧ𝑘 2
⋮ ⋱ ⋮
𝑟𝑝1 𝑟𝑝2 … 1 𝑗, 𝑘 = 1, … , 𝑝
19

Graphical Technique
Bivariate scatterplot
100 200 300 400
Bivariate Scatterplot

5
4
wt
Using R

3
#bivariate scatterplot

2
pairs(~wt+disp+mpg, data=mtcars,

100 200 300 400


main="Bivariate scatterplot") disp

10 15 20 25 30
mpg

2 3 4 5 10 15 20 25 30
20

Trivariate Scatterplot
Using R
3D Scatterplot #trivariate scatterplot
install.packages("scatterplot3d")
library(scatterplot3d)
attach(mtcars)
scatterplot3d(wt,disp,mpg, main="3D Scatterplot")
35

#Scatterplot 3d interactive
30

library(shiny)
library(crosstalk)
25
mpg

library(rgl)

disp
500
20

400 library(plot3D)
300
library(plot3Drgl)
15

200
100
10

1 2 3 4 5 6
0
scatter3Drgl(wt,disp,mpg)
wt
21

Using R
> stars(mtcars[, 1:7], locations = c(0, 0), radius = FALSE,
+ key.loc = c(0, 0), main = "Motor Trend Cars", lty = 2)
22

Chernoff Face

Using R
> #chernoff faces
> install.packages("aplpack")
> library(aplpack)

contoh:
> data(longley)
> faces(longley[1:9,],face.type=0)
> faces(longley[1:9,],face.type=1)
23

You might also like