Professional Documents
Culture Documents
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
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
Descriptive :
1
(1), (2)
Data reduction or structural simplification
2
Sorting and grouping
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,
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