1.1.2 단순상관분석
autoparts=read.csv("data/autoparts.csv",header = TRUE)
autoparts1=autoparts[autoparts$prod_no=="90784-76001",c(2:11)]
autoparts2=autoparts1[autoparts1$c_thickness<1000,]
cor(autoparts2$separation,autoparts2$s_separation)
## [1] -0.9946107
1.1.3 다중상관분석
## fix_time a_speed b_speed separation
## fix_time 1.00000000 -0.40965888 -0.053310788 0.6481035050
## a_speed -0.40965888 1.00000000 0.094201813 -0.6297286266
## b_speed -0.05331079 0.09420181 1.000000000 -0.0079536955
## separation 0.64810350 -0.62972863 -0.007953695 1.0000000000
## s_separation -0.64955379 0.61663567 0.004768493 -0.9946106507
## rate_terms -0.27573524 0.16379549 0.086763287 -0.4065543276
## mpa 0.01128835 0.42082145 0.065904868 0.0827314919
## load_time 0.02037007 0.39266555 0.022221837 -0.3181313349
## highpressure_time 0.01500145 -0.03609957 -0.013110064 -0.0007672313
## c_thickness -0.06179651 -0.16476471 0.011748578 -0.1901120525
## s_separation rate_terms mpa load_time
## fix_time -0.649553792 -0.275735237 0.011288347 0.02037007
## a_speed 0.616635670 0.163795487 0.420821453 0.39266555
## b_speed 0.004768493 0.086763287 0.065904868 0.02222184
## separation -0.994610651 -0.406554328 0.082731492 -0.31813133
## s_separation 1.000000000 0.417739099 -0.079472678 0.31399479
## rate_terms 0.417739099 1.000000000 -0.006729618 0.13530350
## mpa -0.079472678 -0.006729618 1.000000000 0.22330961
## load_time 0.313994794 0.135303504 0.223309612 1.00000000
## highpressure_time -0.009468168 -0.015795293 -0.042117049 -0.02557634
## c_thickness 0.121676176 0.012913095 -0.579886953 -0.12169953
## highpressure_time c_thickness
## fix_time 0.0150014512 -0.06179651
## a_speed -0.0360995659 -0.16476471
## b_speed -0.0131100638 0.01174858
## separation -0.0007672313 -0.19011205
## s_separation -0.0094681675 0.12167618
## rate_terms -0.0157952933 0.01291309
## mpa -0.0421170493 -0.57988695
## load_time -0.0255763439 -0.12169953
## highpressure_time 1.0000000000 0.08522342
## c_thickness 0.0852234187 1.00000000
1.1.4 시각화 - symnum()
x=cor(autoparts2)
symnum(x)
## f a b sp s_ r m l h c
## fix_time 1
## a_speed . 1
## b_speed 1
## separation , , 1
## s_separation , , B 1
## rate_terms . . 1
## mpa . 1
## load_time . . . 1
## highpressure_time 1
## c_thickness . 1
## attr(,"legend")
## [1] 0 ' ' 0.3 '.' 0.6 ',' 0.8 '+' 0.9 '*' 0.95 'B' 1