Notes Theme: - Kelas A: cayman
- Kelas B: tactile
- Kelas C: architect
- Kelas D: hpstr
Library:
> # install.packages("knitr")
> # install.packages("rmarkdown")
> # install.packages("prettydoc")
> # install.packages("equatiomatic")1 PENDAHULUAN
1.1 Latar Belakang
Analisis Multivariat adalah pendekatan statistik yang digunakan untuk menganalisis lebih dari dua variabel secara simultan dalam satu set data. terdapat beberapa metode yang sering digunakan dalam analisis multivariat yaitu: 1) regresi berganda 2) analisis faktor 3) analisis cluster 4) analisis diskriminan 5) analisis komponen utama (PCA). tujuan dari analisis multivariat adalah untuk memahami hubungan, pola, atau pengaruh antarvariabel yang kompleks. Analisis ini digunakan ketika banyak variabel yang saling berhubungan dan mempengaruhi hasil analisis.
Dalam lingkungan pendidikan, Siswa diharapkan mengikuti kegiatan belajar sesuai dengan kurikulum sekolah, tetapi seringkali mereka mendapatkan tekanan dari berbagai pihak. Salah satu akibat dari tekanan tersebut adalah stres yang merupakan proses dimana individu mencoba untuk mengatasi dampak negatif melalui perubahan perilaku dan emosional. Menurut Barseli dkk(2017), stres memiliki dua faktor penyebab yaitu: 1) Internal, mencakup pola pikir, kepribadian, dan keyakinan individu. 2) Eksternal, mencakup tekanan dari lingkungan sekitar diantaranya tekanan untuk berprestasi, status sosial, dan beban belajar yang padat.
pada project ini, akan menerapkan analisis faktor. Analisis ini digunakan untuk mengidentifikasi dan mengelompokkan variabel-varibel yang terkait dengan stress ke dalam faktor-faktor.
1.2 Data
Data yang digunakan dalam project ini adalah dataset Stress Level yang didapat dari website kaggle.com. Data ini mencakup beberapa variabel yaitu: 1) Harga diri(Self esteem) 2) Kesehatan mental(Mental Health History) 3) depresi(depression) 4) sakit kepala(headache) 5) tekanan darah(blood pressure) 6) kualitas tidur(sleep quality) 7) masalah pernapasa(breathing problem) 8) tingkat kebisingan(noise level) 9) kondisi hidup(living conditions) 10) keamanan(safety) 11) kebutuhan dasar(basic needs) 12) kinerja akademik(academic performance) 13) beban belajar(study load) 14) hubungan siswa guru(teacher student relationship) 15) masalah karir masa depan(future carrer concerns) 16) dukungan sosial(social support) 17) tekanan rekan(peer pressure) 18) kegiatan ekstrakulikuler(extracurricular activties) 19) penindasan(bullying) 20) tingkat kecemasan(anxiety level)
library(readxl) Data <- read_excel(“~/Desktop/StressLevelDataset.xlsx”) head(Data)
2 TINJAUAN PUSTAKA
2.1 Analisis Faktor
Analisis Faktor adalah analisis untuk mengidentifikasi, mengelompokkan, dan menyederhanakan faktor-faktor yang menjadi dimensi suatu variabel sehingga didapat faktor yang paling berpengaruh analisis faktor dibagi menjadi dua, diantaranya yaitu: 1) Analisis Faktor eksploratori Analisis tersebut digunakan untuk mengidentifikasi hubungan antara sekelompok variabel observasi tanpa memiliki hipotesis awal sehingga tidak mengikuti model statistik dan dapat memahami struktur data yang kompleks 2) Analisis Faktor Konfirmatori analisis ini digunakan untuk menguji model yang hubungan antar variabel-variabel telah dihipotesiskan sebelumnya sehingga Analisis tersebut dapat menentukan kesesuaian model hipotesis dengan data yang diamati
##Uji Kaiser Mayer Oikin(KMO) Uji KMO merupakan indeks yang digunakan untuk mengukur kecocokan analisis faktor. Jika nilai KMO lebih dari 0.5 maka analisis faktor sesuai
##Uji Bartlett’s Uji Bartlett digunakan untuk menguji hipotesis apakah variabel-variabel yang digunakan memiliki korelasi satu sama lain. Jika nilai p-value<0.05 maka terdapat korelasi yang signifikan antar variabel
3 SOURCE CODE
3.1 Library yang Dibutuhkan
3.2 Memuat data untuk Analisis Faktor
> library(readxl)
> datauap<-read_xlsx("~/Desktop/StressLevelDataset.xlsx")
> datauap
# A tibble: 500 × 22
Student_ID self_esteem mental_health_history depression headache
<dbl> <dbl> <dbl> <dbl> <dbl>
1 1 20 0 11 2
2 2 8 1 15 5
3 3 18 1 14 2
4 4 12 1 15 4
5 5 28 0 7 2
6 6 13 1 21 3
7 7 26 0 6 1
8 8 3 1 22 4
9 9 22 1 12 3
10 10 8 0 27 4
# ℹ 490 more rows
# ℹ 17 more variables: blood_pressure <dbl>, sleep_quality <dbl>,
# breathing_problem <dbl>, noise_level <dbl>, living_conditions <dbl>,
# safety <dbl>, basic_needs <dbl>, academic_performance <dbl>,
# study_load <dbl>, teacher_student_relationship <dbl>,
# future_career_concerns <dbl>, social_support <dbl>, peer_pressure <dbl>,
# extracurricular_activities <dbl>, bullying <dbl>, stress_level <dbl>, …3.3 Statistika Deskriptif
> statdes<-summary(datauap)
> statdes
Student_ID self_esteem mental_health_history depression
Min. : 1.0 Min. : 0.00 Min. :0.000 Min. : 0.00
1st Qu.:125.8 1st Qu.:10.00 1st Qu.:0.000 1st Qu.: 6.00
Median :250.5 Median :19.00 Median :1.000 Median :12.00
Mean :250.5 Mean :17.58 Mean :0.518 Mean :12.55
3rd Qu.:375.2 3rd Qu.:26.00 3rd Qu.:1.000 3rd Qu.:19.00
Max. :500.0 Max. :30.00 Max. :1.000 Max. :27.00
headache blood_pressure sleep_quality breathing_problem
Min. :0.000 Min. :1.0 Min. :0.000 Min. :0.000
1st Qu.:1.000 1st Qu.:1.0 1st Qu.:1.000 1st Qu.:2.000
Median :3.000 Median :2.0 Median :3.000 Median :3.000
Mean :2.506 Mean :2.2 Mean :2.654 Mean :2.762
3rd Qu.:3.000 3rd Qu.:3.0 3rd Qu.:4.000 3rd Qu.:4.000
Max. :5.000 Max. :3.0 Max. :5.000 Max. :5.000
noise_level living_conditions safety basic_needs
Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000
1st Qu.:2.000 1st Qu.:2.000 1st Qu.:2.000 1st Qu.:2.000
Median :3.000 Median :2.000 Median :2.000 Median :3.000
Mean :2.648 Mean :2.518 Mean :2.722 Mean :2.744
3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.000
Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000
academic_performance study_load teacher_student_relationship
Min. :0.000 Min. :0.000 Min. :0.000
1st Qu.:2.000 1st Qu.:2.000 1st Qu.:2.000
Median :2.000 Median :2.000 Median :2.000
Mean :2.784 Mean :2.616 Mean :2.648
3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:4.000
Max. :5.000 Max. :5.000 Max. :5.000
future_career_concerns social_support peer_pressure
Min. :0.000 Min. :0.000 Min. :0.000
1st Qu.:1.000 1st Qu.:1.000 1st Qu.:2.000
Median :2.000 Median :2.000 Median :2.000
Mean :2.666 Mean :1.868 Mean :2.692
3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:4.000
Max. :5.000 Max. :3.000 Max. :5.000
extracurricular_activities bullying stress_level anxiety_level
Min. :0.000 Min. :0.000 Min. :0.000 Min. : 0.00
1st Qu.:2.000 1st Qu.:1.000 1st Qu.:0.000 1st Qu.: 6.00
Median :2.000 Median :3.000 Median :1.000 Median :11.00
Mean :2.806 Mean :2.612 Mean :0.986 Mean :11.05
3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:2.000 3rd Qu.:16.00
Max. :5.000 Max. :5.000 Max. :2.000 Max. :21.00 3.4 Matriks Korelasi
> korelasi <- cor(datauap[, 2:21])
> korelasi
self_esteem mental_health_history depression
self_esteem 1.0000000 -0.5957828 -0.7057704
mental_health_history -0.5957828 1.0000000 0.6247005
depression -0.7057704 0.6247005 1.0000000
headache -0.6028038 0.6131969 0.6770994
blood_pressure -0.5160849 0.2856729 0.4345251
sleep_quality 0.6598142 -0.6319278 -0.6523040
breathing_problem -0.4851090 0.4743745 0.5151724
noise_level -0.5517327 0.5220893 0.5765147
living_conditions 0.5365421 -0.4858086 -0.5379868
safety 0.6705298 -0.5642558 -0.6090904
basic_needs 0.6349771 -0.6426454 -0.6647695
academic_performance 0.6236066 -0.5785702 -0.6230307
study_load -0.5778588 0.5062999 0.5850028
teacher_student_relationship 0.6856988 -0.6160991 -0.6684925
future_career_concerns -0.7086817 0.6295120 0.7311856
social_support 0.6885481 -0.4883634 -0.6218058
peer_pressure -0.5626245 0.5803505 0.6426637
extracurricular_activities -0.6276547 0.5258265 0.6156130
bullying -0.5941417 0.5926405 0.6355899
stress_level -0.7529462 0.6672981 0.7473347
headache blood_pressure sleep_quality
self_esteem -0.6028038 -0.5160849 0.6598142
mental_health_history 0.6131969 0.2856729 -0.6319278
depression 0.6770994 0.4345251 -0.6523040
headache 1.0000000 0.3457885 -0.6280362
blood_pressure 0.3457885 1.0000000 -0.3031059
sleep_quality -0.6280362 -0.3031059 1.0000000
breathing_problem 0.4481000 0.1359475 -0.5631304
noise_level 0.5256181 0.3342087 -0.5892789
living_conditions -0.5789224 -0.2852125 0.5134280
safety -0.5835435 -0.3147643 0.6572889
basic_needs -0.6463835 -0.3114533 0.6314473
academic_performance -0.6435559 -0.2461408 0.6532716
study_load 0.4850207 0.3449700 -0.5312715
teacher_student_relationship -0.6184316 -0.3605273 0.6637286
future_career_concerns 0.6726293 0.4484375 -0.6672404
social_support -0.5540366 -0.7600887 0.5538751
peer_pressure 0.6024583 0.3429908 -0.6857380
extracurricular_activities 0.5670282 0.4538253 -0.6367613
bullying 0.6090666 0.3699953 -0.7142521
stress_level 0.7064500 0.3864993 -0.7773345
breathing_problem noise_level living_conditions
self_esteem -0.4851090 -0.5517327 0.5365421
mental_health_history 0.4743745 0.5220893 -0.4858086
depression 0.5151724 0.5765147 -0.5379868
headache 0.4481000 0.5256181 -0.5789224
blood_pressure 0.1359475 0.3342087 -0.2852125
sleep_quality -0.5631304 -0.5892789 0.5134280
breathing_problem 1.0000000 0.4705524 -0.4341513
noise_level 0.4705524 1.0000000 -0.4580749
living_conditions -0.4341513 -0.4580749 1.0000000
safety -0.4802085 -0.5312161 0.5709477
basic_needs -0.4893347 -0.5808671 0.5222326
academic_performance -0.5222815 -0.5344738 0.5046263
study_load 0.4218984 0.5038317 -0.4461213
teacher_student_relationship -0.4825568 -0.5556498 0.5728200
future_career_concerns 0.5392495 0.5483083 -0.5843338
social_support -0.3303347 -0.4674100 0.4909426
peer_pressure 0.4662107 0.5832084 -0.4916036
extracurricular_activities 0.5611112 0.5585374 -0.5207051
bullying 0.5534357 0.6042642 -0.5719082
stress_level 0.5951415 0.6690235 -0.5765792
safety basic_needs academic_performance
self_esteem 0.6705298 0.6349771 0.6236066
mental_health_history -0.5642558 -0.6426454 -0.5785702
depression -0.6090904 -0.6647695 -0.6230307
headache -0.5835435 -0.6463835 -0.6435559
blood_pressure -0.3147643 -0.3114533 -0.2461408
sleep_quality 0.6572889 0.6314473 0.6532716
breathing_problem -0.4802085 -0.4893347 -0.5222815
noise_level -0.5312161 -0.5808671 -0.5344738
living_conditions 0.5709477 0.5222326 0.5046263
safety 1.0000000 0.5963152 0.6281958
basic_needs 0.5963152 1.0000000 0.6327560
academic_performance 0.6281958 0.6327560 1.0000000
study_load -0.4849248 -0.5215172 -0.5016718
teacher_student_relationship 0.6803932 0.6556185 0.6641880
future_career_concerns -0.6438662 -0.6622893 -0.6331695
social_support 0.6364808 0.6000693 0.5390831
peer_pressure -0.5220985 -0.5770916 -0.5405191
extracurricular_activities -0.5898177 -0.5197698 -0.6279680
bullying -0.6430551 -0.6490175 -0.6235802
stress_level -0.6913344 -0.7151723 -0.7446903
study_load teacher_student_relationship
self_esteem -0.5778588 0.6856988
mental_health_history 0.5062999 -0.6160991
depression 0.5850028 -0.6684925
headache 0.4850207 -0.6184316
blood_pressure 0.3449700 -0.3605273
sleep_quality -0.5312715 0.6637286
breathing_problem 0.4218984 -0.4825568
noise_level 0.5038317 -0.5556498
living_conditions -0.4461213 0.5728200
safety -0.4849248 0.6803932
basic_needs -0.5215172 0.6556185
academic_performance -0.5016718 0.6641880
study_load 1.0000000 -0.5113243
teacher_student_relationship -0.5113243 1.0000000
future_career_concerns 0.5679410 -0.6777432
social_support -0.4426723 0.6787719
peer_pressure 0.5324161 -0.5855816
extracurricular_activities 0.5611427 -0.6142069
bullying 0.5506807 -0.6607174
stress_level 0.6394153 -0.6990449
future_career_concerns social_support
self_esteem -0.7086817 0.6885481
mental_health_history 0.6295120 -0.4883634
depression 0.7311856 -0.6218058
headache 0.6726293 -0.5540366
blood_pressure 0.4484375 -0.7600887
sleep_quality -0.6672404 0.5538751
breathing_problem 0.5392495 -0.3303347
noise_level 0.5483083 -0.4674100
living_conditions -0.5843338 0.4909426
safety -0.6438662 0.6364808
basic_needs -0.6622893 0.6000693
academic_performance -0.6331695 0.5390831
study_load 0.5679410 -0.4426723
teacher_student_relationship -0.6777432 0.6787719
future_career_concerns 1.0000000 -0.6008870
social_support -0.6008870 1.0000000
peer_pressure 0.6622369 -0.4050379
extracurricular_activities 0.6572354 -0.5492149
bullying 0.7146245 -0.5457970
stress_level 0.7550700 -0.6099381
peer_pressure extracurricular_activities
self_esteem -0.5626245 -0.6276547
mental_health_history 0.5803505 0.5258265
depression 0.6426637 0.6156130
headache 0.6024583 0.5670282
blood_pressure 0.3429908 0.4538253
sleep_quality -0.6857380 -0.6367613
breathing_problem 0.4662107 0.5611112
noise_level 0.5832084 0.5585374
living_conditions -0.4916036 -0.5207051
safety -0.5220985 -0.5898177
basic_needs -0.5770916 -0.5197698
academic_performance -0.5405191 -0.6279680
study_load 0.5324161 0.5611427
teacher_student_relationship -0.5855816 -0.6142069
future_career_concerns 0.6622369 0.6572354
social_support -0.4050379 -0.5492149
peer_pressure 1.0000000 0.6383326
extracurricular_activities 0.6383326 1.0000000
bullying 0.6469882 0.6740318
stress_level 0.6862466 0.6932815
bullying stress_level
self_esteem -0.5941417 -0.7529462
mental_health_history 0.5926405 0.6672981
depression 0.6355899 0.7473347
headache 0.6090666 0.7064500
blood_pressure 0.3699953 0.3864993
sleep_quality -0.7142521 -0.7773345
breathing_problem 0.5534357 0.5951415
noise_level 0.6042642 0.6690235
living_conditions -0.5719082 -0.5765792
safety -0.6430551 -0.6913344
basic_needs -0.6490175 -0.7151723
academic_performance -0.6235802 -0.7446903
study_load 0.5506807 0.6394153
teacher_student_relationship -0.6607174 -0.6990449
future_career_concerns 0.7146245 0.7550700
social_support -0.5457970 -0.6099381
peer_pressure 0.6469882 0.6862466
extracurricular_activities 0.6740318 0.6932815
bullying 1.0000000 0.7683284
stress_level 0.7683284 1.00000003.6 Uji Bartlett
3.7 Ekstraksi Faktor dengan PCA menggunakan Nilai Eigen
> hasil_eigen<-eigen(korelasi)
> nilai_eigen<-hasil_eigen$values
> print(nilai_eigen)
[1] 11.98627420 1.24673608 0.73736052 0.62896300 0.57200813 0.53453048
[7] 0.50520908 0.47666826 0.42763549 0.37453260 0.37117009 0.33501199
[13] 0.30569262 0.29397994 0.27848874 0.25067509 0.23998101 0.20288107
[19] 0.14612130 0.086080313.8 Membuat plot Nilai Eigen
> screeplot = plot(nilai_eigen, main = "Scree Plot", xlab = "Faktor", ylab = "Eigen Values", pch = 16, type = "o", col = "purple", lwd = 1) + axis(1, at = seq(1,9)) + abline(h=1, col = "black")
## Rotasi Faktor dengan Varimax Method pada Analisis Faktor
> analisis_faktor<- principal(datauap,nfactor=2,rotate="varimax", scores=T)
> analisis_faktor
Principal Components Analysis
Call: principal(r = datauap, nfactors = 2, rotate = "varimax", scores = T)
Standardized loadings (pattern matrix) based upon correlation matrix
RC1 RC2 h2 u2 com
Student_ID -0.06 0.45 0.21 0.79 1.0
self_esteem -0.73 -0.43 0.73 0.27 1.6
mental_health_history 0.76 0.11 0.59 0.41 1.0
depression 0.79 0.28 0.70 0.30 1.2
headache 0.76 0.20 0.62 0.38 1.1
blood_pressure 0.26 0.84 0.77 0.23 1.2
sleep_quality -0.84 -0.11 0.71 0.29 1.0
breathing_problem 0.72 -0.13 0.54 0.46 1.1
noise_level 0.72 0.12 0.54 0.46 1.1
living_conditions -0.66 -0.21 0.48 0.52 1.2
safety -0.74 -0.28 0.62 0.38 1.3
basic_needs -0.78 -0.18 0.64 0.36 1.1
academic_performance -0.79 -0.10 0.64 0.36 1.0
study_load 0.67 0.18 0.48 0.52 1.2
teacher_student_relationship -0.77 -0.31 0.68 0.32 1.3
future_career_concerns 0.81 0.27 0.73 0.27 1.2
social_support -0.54 -0.74 0.84 0.16 1.8
peer_pressure 0.78 0.08 0.61 0.39 1.0
extracurricular_activities 0.75 0.26 0.62 0.38 1.2
bullying 0.82 0.16 0.69 0.31 1.1
stress_level 0.89 0.18 0.82 0.18 1.1
anxiety_level 0.84 0.13 0.72 0.28 1.0
RC1 RC2
SS loadings 11.66 2.33
Proportion Var 0.53 0.11
Cumulative Var 0.53 0.64
Proportion Explained 0.83 0.17
Cumulative Proportion 0.83 1.00
Mean item complexity = 1.2
Test of the hypothesis that 2 components are sufficient.
The root mean square of the residuals (RMSR) is 0.04
with the empirical chi square 382.57 with prob < 2.2e-15
Fit based upon off diagonal values = 0.994 HASIL DAN PEMBAHASAN
4.1 Statistika Deskriptif
Berikut merupakan ringkasan dari data stress level
> statdes<-summary(datauap)
> statdes
Student_ID self_esteem mental_health_history depression
Min. : 1.0 Min. : 0.00 Min. :0.000 Min. : 0.00
1st Qu.:125.8 1st Qu.:10.00 1st Qu.:0.000 1st Qu.: 6.00
Median :250.5 Median :19.00 Median :1.000 Median :12.00
Mean :250.5 Mean :17.58 Mean :0.518 Mean :12.55
3rd Qu.:375.2 3rd Qu.:26.00 3rd Qu.:1.000 3rd Qu.:19.00
Max. :500.0 Max. :30.00 Max. :1.000 Max. :27.00
headache blood_pressure sleep_quality breathing_problem
Min. :0.000 Min. :1.0 Min. :0.000 Min. :0.000
1st Qu.:1.000 1st Qu.:1.0 1st Qu.:1.000 1st Qu.:2.000
Median :3.000 Median :2.0 Median :3.000 Median :3.000
Mean :2.506 Mean :2.2 Mean :2.654 Mean :2.762
3rd Qu.:3.000 3rd Qu.:3.0 3rd Qu.:4.000 3rd Qu.:4.000
Max. :5.000 Max. :3.0 Max. :5.000 Max. :5.000
noise_level living_conditions safety basic_needs
Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000
1st Qu.:2.000 1st Qu.:2.000 1st Qu.:2.000 1st Qu.:2.000
Median :3.000 Median :2.000 Median :2.000 Median :3.000
Mean :2.648 Mean :2.518 Mean :2.722 Mean :2.744
3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.000
Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000
academic_performance study_load teacher_student_relationship
Min. :0.000 Min. :0.000 Min. :0.000
1st Qu.:2.000 1st Qu.:2.000 1st Qu.:2.000
Median :2.000 Median :2.000 Median :2.000
Mean :2.784 Mean :2.616 Mean :2.648
3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:4.000
Max. :5.000 Max. :5.000 Max. :5.000
future_career_concerns social_support peer_pressure
Min. :0.000 Min. :0.000 Min. :0.000
1st Qu.:1.000 1st Qu.:1.000 1st Qu.:2.000
Median :2.000 Median :2.000 Median :2.000
Mean :2.666 Mean :1.868 Mean :2.692
3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:4.000
Max. :5.000 Max. :3.000 Max. :5.000
extracurricular_activities bullying stress_level anxiety_level
Min. :0.000 Min. :0.000 Min. :0.000 Min. : 0.00
1st Qu.:2.000 1st Qu.:1.000 1st Qu.:0.000 1st Qu.: 6.00
Median :2.000 Median :3.000 Median :1.000 Median :11.00
Mean :2.806 Mean :2.612 Mean :0.986 Mean :11.05
3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:2.000 3rd Qu.:16.00
Max. :5.000 Max. :5.000 Max. :2.000 Max. :21.00
> par(mfrow = c(1, 4))
> boxplot(datauap$self_esteem)
> boxplot(datauap$mental_health_history)
> boxplot(datauap$depression)
> boxplot(datauap$headache)> boxplot(datauap$blood_pressure)
> boxplot(datauap$sleep_quality)
> boxplot(datauap$breathing_problem)
> boxplot(datauap$noise_level)> boxplot(datauap$living_conditions)
> boxplot(datauap$safety)
> boxplot(datauap$basic_needs)
> boxplot(datauap$academic_performance)> boxplot(datauap$study_load)
> boxplot(datauap$teacher_student_relationship)
> boxplot(datauap$future_career_concerns)
> boxplot(datauap$social_support)> boxplot(datauap$peer_pressure)
> boxplot(datauap$extracurricular_activities)
> boxplot(datauap$bullying)
> boxplot(datauap$stress_level)
berdasarkan hasil pemusatan dan penyebaran data, didapat bahwa variabel
harga diri memiliki penilaian tertinggi dibandingkan dengan variabel
lainnya, sedangkan variabel kesehatan mental paling rendah.
4.2 Uji pada data
4.2.1 Uji KMO
> kmos<-KMOS(datauap[,2:21])
> kmos
Kaiser-Meyer-Olkin Statistics
Call: KMOS(x = datauap[, 2:21])
Measures of Sampling Adequacy (MSA):
self_esteem mental_health_history
0.9697512 0.9865526
depression headache
0.9827390 0.9781643
blood_pressure sleep_quality
0.7268739 0.9675986
breathing_problem noise_level
0.9740003 0.9827036
living_conditions safety
0.9804661 0.9608324
basic_needs academic_performance
0.9624327 0.9730085
study_load teacher_student_relationship
0.9842576 0.9588221
future_career_concerns social_support
0.9787131 0.8456072
peer_pressure extracurricular_activities
0.9431634 0.9680662
bullying stress_level
0.9670895 0.9705624
KMO-Criterion: 0.9571964dapat disimpulkan bahwa data tersebut cukup relevan untuk difaktorkan. selain itu nilai MSA dari semua variabel lebih dari 0.5 sehingga semua variabel dapat diikut sertakan dalam analisis. ### Uji Korelasi
> korelasi <- cor(datauap[, 2:21])
> korelasi
self_esteem mental_health_history depression
self_esteem 1.0000000 -0.5957828 -0.7057704
mental_health_history -0.5957828 1.0000000 0.6247005
depression -0.7057704 0.6247005 1.0000000
headache -0.6028038 0.6131969 0.6770994
blood_pressure -0.5160849 0.2856729 0.4345251
sleep_quality 0.6598142 -0.6319278 -0.6523040
breathing_problem -0.4851090 0.4743745 0.5151724
noise_level -0.5517327 0.5220893 0.5765147
living_conditions 0.5365421 -0.4858086 -0.5379868
safety 0.6705298 -0.5642558 -0.6090904
basic_needs 0.6349771 -0.6426454 -0.6647695
academic_performance 0.6236066 -0.5785702 -0.6230307
study_load -0.5778588 0.5062999 0.5850028
teacher_student_relationship 0.6856988 -0.6160991 -0.6684925
future_career_concerns -0.7086817 0.6295120 0.7311856
social_support 0.6885481 -0.4883634 -0.6218058
peer_pressure -0.5626245 0.5803505 0.6426637
extracurricular_activities -0.6276547 0.5258265 0.6156130
bullying -0.5941417 0.5926405 0.6355899
stress_level -0.7529462 0.6672981 0.7473347
headache blood_pressure sleep_quality
self_esteem -0.6028038 -0.5160849 0.6598142
mental_health_history 0.6131969 0.2856729 -0.6319278
depression 0.6770994 0.4345251 -0.6523040
headache 1.0000000 0.3457885 -0.6280362
blood_pressure 0.3457885 1.0000000 -0.3031059
sleep_quality -0.6280362 -0.3031059 1.0000000
breathing_problem 0.4481000 0.1359475 -0.5631304
noise_level 0.5256181 0.3342087 -0.5892789
living_conditions -0.5789224 -0.2852125 0.5134280
safety -0.5835435 -0.3147643 0.6572889
basic_needs -0.6463835 -0.3114533 0.6314473
academic_performance -0.6435559 -0.2461408 0.6532716
study_load 0.4850207 0.3449700 -0.5312715
teacher_student_relationship -0.6184316 -0.3605273 0.6637286
future_career_concerns 0.6726293 0.4484375 -0.6672404
social_support -0.5540366 -0.7600887 0.5538751
peer_pressure 0.6024583 0.3429908 -0.6857380
extracurricular_activities 0.5670282 0.4538253 -0.6367613
bullying 0.6090666 0.3699953 -0.7142521
stress_level 0.7064500 0.3864993 -0.7773345
breathing_problem noise_level living_conditions
self_esteem -0.4851090 -0.5517327 0.5365421
mental_health_history 0.4743745 0.5220893 -0.4858086
depression 0.5151724 0.5765147 -0.5379868
headache 0.4481000 0.5256181 -0.5789224
blood_pressure 0.1359475 0.3342087 -0.2852125
sleep_quality -0.5631304 -0.5892789 0.5134280
breathing_problem 1.0000000 0.4705524 -0.4341513
noise_level 0.4705524 1.0000000 -0.4580749
living_conditions -0.4341513 -0.4580749 1.0000000
safety -0.4802085 -0.5312161 0.5709477
basic_needs -0.4893347 -0.5808671 0.5222326
academic_performance -0.5222815 -0.5344738 0.5046263
study_load 0.4218984 0.5038317 -0.4461213
teacher_student_relationship -0.4825568 -0.5556498 0.5728200
future_career_concerns 0.5392495 0.5483083 -0.5843338
social_support -0.3303347 -0.4674100 0.4909426
peer_pressure 0.4662107 0.5832084 -0.4916036
extracurricular_activities 0.5611112 0.5585374 -0.5207051
bullying 0.5534357 0.6042642 -0.5719082
stress_level 0.5951415 0.6690235 -0.5765792
safety basic_needs academic_performance
self_esteem 0.6705298 0.6349771 0.6236066
mental_health_history -0.5642558 -0.6426454 -0.5785702
depression -0.6090904 -0.6647695 -0.6230307
headache -0.5835435 -0.6463835 -0.6435559
blood_pressure -0.3147643 -0.3114533 -0.2461408
sleep_quality 0.6572889 0.6314473 0.6532716
breathing_problem -0.4802085 -0.4893347 -0.5222815
noise_level -0.5312161 -0.5808671 -0.5344738
living_conditions 0.5709477 0.5222326 0.5046263
safety 1.0000000 0.5963152 0.6281958
basic_needs 0.5963152 1.0000000 0.6327560
academic_performance 0.6281958 0.6327560 1.0000000
study_load -0.4849248 -0.5215172 -0.5016718
teacher_student_relationship 0.6803932 0.6556185 0.6641880
future_career_concerns -0.6438662 -0.6622893 -0.6331695
social_support 0.6364808 0.6000693 0.5390831
peer_pressure -0.5220985 -0.5770916 -0.5405191
extracurricular_activities -0.5898177 -0.5197698 -0.6279680
bullying -0.6430551 -0.6490175 -0.6235802
stress_level -0.6913344 -0.7151723 -0.7446903
study_load teacher_student_relationship
self_esteem -0.5778588 0.6856988
mental_health_history 0.5062999 -0.6160991
depression 0.5850028 -0.6684925
headache 0.4850207 -0.6184316
blood_pressure 0.3449700 -0.3605273
sleep_quality -0.5312715 0.6637286
breathing_problem 0.4218984 -0.4825568
noise_level 0.5038317 -0.5556498
living_conditions -0.4461213 0.5728200
safety -0.4849248 0.6803932
basic_needs -0.5215172 0.6556185
academic_performance -0.5016718 0.6641880
study_load 1.0000000 -0.5113243
teacher_student_relationship -0.5113243 1.0000000
future_career_concerns 0.5679410 -0.6777432
social_support -0.4426723 0.6787719
peer_pressure 0.5324161 -0.5855816
extracurricular_activities 0.5611427 -0.6142069
bullying 0.5506807 -0.6607174
stress_level 0.6394153 -0.6990449
future_career_concerns social_support
self_esteem -0.7086817 0.6885481
mental_health_history 0.6295120 -0.4883634
depression 0.7311856 -0.6218058
headache 0.6726293 -0.5540366
blood_pressure 0.4484375 -0.7600887
sleep_quality -0.6672404 0.5538751
breathing_problem 0.5392495 -0.3303347
noise_level 0.5483083 -0.4674100
living_conditions -0.5843338 0.4909426
safety -0.6438662 0.6364808
basic_needs -0.6622893 0.6000693
academic_performance -0.6331695 0.5390831
study_load 0.5679410 -0.4426723
teacher_student_relationship -0.6777432 0.6787719
future_career_concerns 1.0000000 -0.6008870
social_support -0.6008870 1.0000000
peer_pressure 0.6622369 -0.4050379
extracurricular_activities 0.6572354 -0.5492149
bullying 0.7146245 -0.5457970
stress_level 0.7550700 -0.6099381
peer_pressure extracurricular_activities
self_esteem -0.5626245 -0.6276547
mental_health_history 0.5803505 0.5258265
depression 0.6426637 0.6156130
headache 0.6024583 0.5670282
blood_pressure 0.3429908 0.4538253
sleep_quality -0.6857380 -0.6367613
breathing_problem 0.4662107 0.5611112
noise_level 0.5832084 0.5585374
living_conditions -0.4916036 -0.5207051
safety -0.5220985 -0.5898177
basic_needs -0.5770916 -0.5197698
academic_performance -0.5405191 -0.6279680
study_load 0.5324161 0.5611427
teacher_student_relationship -0.5855816 -0.6142069
future_career_concerns 0.6622369 0.6572354
social_support -0.4050379 -0.5492149
peer_pressure 1.0000000 0.6383326
extracurricular_activities 0.6383326 1.0000000
bullying 0.6469882 0.6740318
stress_level 0.6862466 0.6932815
bullying stress_level
self_esteem -0.5941417 -0.7529462
mental_health_history 0.5926405 0.6672981
depression 0.6355899 0.7473347
headache 0.6090666 0.7064500
blood_pressure 0.3699953 0.3864993
sleep_quality -0.7142521 -0.7773345
breathing_problem 0.5534357 0.5951415
noise_level 0.6042642 0.6690235
living_conditions -0.5719082 -0.5765792
safety -0.6430551 -0.6913344
basic_needs -0.6490175 -0.7151723
academic_performance -0.6235802 -0.7446903
study_load 0.5506807 0.6394153
teacher_student_relationship -0.6607174 -0.6990449
future_career_concerns 0.7146245 0.7550700
social_support -0.5457970 -0.6099381
peer_pressure 0.6469882 0.6862466
extracurricular_activities 0.6740318 0.6932815
bullying 1.0000000 0.7683284
stress_level 0.7683284 1.00000004.2.2 Uji Bartlett
> bart_spher(datauap)
Bartlett's Test of Sphericity
Call: bart_spher(x = datauap)
X2 = 8998.647
df = 231
p-value < 2.22e-16dapat disimpulkan bahwa variabel pada data tersebut saling berkorelasi dan layak digunakan dalam analisis faktor karena nilai p-value kurang dari 0.05 ### Ekstraksi Faktor dengan PCA menggunakan Nilai Eigen
> hasil_eigen<-eigen(korelasi)
> nilai_eigen<-hasil_eigen$values
> print(nilai_eigen)
[1] 11.98627420 1.24673608 0.73736052 0.62896300 0.57200813 0.53453048
[7] 0.50520908 0.47666826 0.42763549 0.37453260 0.37117009 0.33501199
[13] 0.30569262 0.29397994 0.27848874 0.25067509 0.23998101 0.20288107
[19] 0.14612130 0.08608031terdapat 2 faktor yang terbentuk faktor dengan nilai eigen lebih dari satu. ### plot nilai eigen pada plot terdapat data yang turun secara signifikan yaitu faktor 2.
5 KESIMPULAN
kesimpulan yang diperoleh adalah dengan mengetahui faktor yang paling mempengaruhi terhadap stres siswa adalah faktor psikologis dengan variabel bullying atau penindasan. Menurut statistika deskriptif, variabel yang paling berpengaruh yaitu harga diri.
6 DAFTAR PUSTAKA
Juliano, Elvin. (2023). Analisis Statistik Faktor-Faktor yang Mempengaruhi Rendahnya Minat Masyarakat dalam Menggunakan Layanan PT Pos Indonesia (PERSERO). Jurnal Matematika dan Pendidikan Matematik, 41-49.
Pujoseno Jimmy. 2023. Analisis Faktor Menggunakan R. Diakses pada 27 November 2024, dari https://thinkstudioo.blogspot.com/2020/11/analisis-faktor-menggunakan-r.html
Aviana, E. S. D. 2020. Analisis Faktor dengan RStudio. Diakses pada 27 November 2024, dari https://medium.com/@17611051/analisis-faktor-dengan-rstudio-597361ed691e