setwd("~/Documents/Internal Research/Penelitian 2020 Ganjil") library(psych) library(GPArotation) ## load data mentah data_ukur <- read.csv("Pengukuran Kualitas Layanan Elearning- 30 Nov-edited.csv", header = TRUE) ## ambil data numerik utk pengukuran statistik data_ukur_num <- as.data.frame(data_ukur[,5:24]) ## ambil data non-numberik utk pengukuran deskriptif data_ukur_non_num <- as.data.frame(data_ukur[,2:4]) ## kelompokan data berdasarkan faktor x1 <- data_ukur_num[,1:4] x2 <- data_ukur_num[,5:8] x3 <- data_ukur_num[,9:12] x4 <- data_ukur_num[,13:16] x5 <- data_ukur_num[,17:20] ## hitung rata-rata utk setiap baris dan buat kolom baru x1$rata <- rowMeans(x1) x2$rata <- rowMeans(x2) x3$rata <- rowMeans(x3) x4$rata <- rowMeans(x4) x5$rata <- rowMeans(x5) ## hitung KMO kmoX1 <- KMO(x1[,1:4]) kmoX2 <- KMO(x2[,1:4]) kmoX3 <- KMO(x3[,1:4]) kmoX4 <- KMO(x4[,1:4]) kmoX5 <- KMO(x5[,1:4]) ## hitung reliability reliabelX1 <- alpha(x1[,1:4]) reliabelX2 <- alpha(x2[,1:4]) reliabelX3 <- alpha(x3[,1:4]) reliabelX4 <- alpha(x4[,1:4]) reliabelX5 <- alpha(x5[,1:4]) ## hitung factor analysis # Step 1 : cari jml factor yang dapat diterima untuk melakukan perhitungan factor analysis dan # fungsi yang dipakai fa.parallel() dengan metode 'minres'. # Hasil dari fa.parallel() berupa grafik dan informasi yang berupa saran jumlah factor # yang dibutuhkan oleh fungsi perhitungan factor analysis yaitu fungsi fa(). # # Selain itu juga dihasilkan grafik dengan judul Parallel Analysis Scree Plots, dimana # arti dari grafik garisnya adalah Garis biru menunjukkan nilai eigen dari data aktual # dan dua garis merah (ditempatkan di atas satu sama lain) menunjukkan data simulasi # dan sampel ulang. # Step 2 : lakukan hitungan factor analysis dengan berdasarkan saran dari fa.paralel() fa.parallel(x1[,1:4], fm = 'minres', fa = 'fa') x1_fac <- factanal(x1[,1:4], 1, rotation = 'varimax') fa.parallel(x2[,1:4], fm = 'minres', fa = 'fa') x2_fac <- factanal(x2[,1:4], 1, rotation = 'varimax') fa.parallel(x3[,1:4], fm = 'minres', fa = 'fa') x3_fac <- factanal(x3[,1:4], 1, rotation = 'varimax') fa.parallel(x4[,1:4], fm = 'minres', fa = 'fa') x4_fac <- factanal(x4[,1:4], 1, rotation = 'varimax') fa.parallel(x5[,1:4], fm = 'minres', fa = 'fa') x5_fac <- factanal(x5[,1:4], 1, rotation = 'varimax') # Step 3 : lakukan penggabungan rata-rata untuk masing-masing faktor dan hitung factor analysis spt step 1 dan 2 xgabungan <- data.frame(x1 = x1$rata, x2 = x2$rata, x3 = x3$rata, x4 = x4$rata, x5 = x5$rata) fa.parallel(xgabungan, fm = 'minres', fa = 'fa') xgabungan_fac <- factanal(xgabungan, 1, rotation = 'varimax') ## Data hitungan deskriptif # Respondent berdasarkan prodi resp_prodi <- as.data.frame(table(data_ukur_non_num$Program.Studi)) names(resp_prodi) <- c('Prodi','Freq') # Respondent berdasarkan semester resp_semester <- as.data.frame(table(data_ukur_non_num$Semester)) names(resp_semester) <- c('Semester','Freq') # Respondent berdasarkan jenis kelamin resp_jk <- as.data.frame(table(data_ukur_non_num$Jenis.Kelamin)) names(resp_jk) <- c('JenKel','Freq') ## Pengelompokan data berdasarkan Program Studi Prodi_SI <- data_ukur_non_num[data_ukur_non_num$Program.Studi == 'Sistem Informasi',] Prodi_MI <- data_ukur_non_num[data_ukur_non_num$Program.Studi == 'Manajemen Informatika',] Prodi_TI <- data_ukur_non_num[data_ukur_non_num$Program.Studi == 'Teknik Informatika',] ##Prodi SI # Respondent berdasarkan prodi dan jenis kelamin SIprodi_jenkel <- as.data.frame(table(Prodi_SI$Jenis.Kelamin)) names(SIprodi_jenkel) <- c('Jenkel','Freq') # Respondent berdasarkan prodi dan semester SIprodi_semester <- as.data.frame(table(Prodi_SI$Semester)) names(SIprodi_semester) <- c('Semester','Freq') ##Prodi MI # Respondent berdasarkan prodi dan jenis kelamin MIprodi_jenkel <- as.data.frame(table(Prodi_MI$Jenis.Kelamin)) names(MIprodi_jenkel) <- c('Jenkel','Freq') # Respondent berdasarkan prodi dan semester MIprodi_semester <- as.data.frame(table(Prodi_MI$Semester)) names(MIprodi_semester) <- c('Semester','Freq') ##Prodi TI # Respondent berdasarkan prodi dan jenis kelamin TIprodi_jenkel <- as.data.frame(table(Prodi_TI$Jenis.Kelamin)) names(TIprodi_jenkel) <- c('Jenkel','Freq') # Respondent berdasarkan prodi dan semester TIprodi_semester <- as.data.frame(table(Prodi_TI$Semester)) names(TIprodi_semester) <- c('Semester', 'Freq') ## gambar grafik utk data hitungan deskriptif library(plotly) library(dplyr) # responden berdasarkan program studi fig1 <- plot_ly(resp_prodi, labels = ~Prodi, values = ~Freq, type = 'pie') fig1 <- fig1 %>% layout(title = 'Responden Berdasarkan Program Studi', xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE), yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE)) fig1 # responden berdasarkan jenis kelamin fig2 <- plot_ly(resp_jk, labels = ~JenKel, values = ~Freq, type = 'pie') fig2 <- fig2 %>% layout(title = 'Responden Berdasarkan Jenis Kelamin', xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE), yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE)) fig2 # responden berdasarkan semester fig3 <- plot_ly(resp_semester, x = ~Semester, y = ~Freq, type = 'bar', name = 'Proporsi Respoden berdasarkan Semester') fig3 <- fig3 %>% layout(title = 'Responden berdasarkan Semester', yaxis = list(title = 'Jumlah')) fig3 # responden berdasarkan prodi dan jenis kelamin fig4 <- plot_ly() fig4 <- fig4 %>% add_pie(data = SIprodi_jenkel, label = ~Jenkel, values = ~Freq, name = 'SI', text = 'SI', domain = list(x = c(0,0.4),y = c(0.4,1))) fig4 <- fig4 %>% add_pie(data = MIprodi_jenkel, label = ~Jenkel, values = ~Freq, name = 'MI', text = 'MI', domain = list(x = c(0.6,1),y = c(0.4,1))) fig4 <- fig4 %>% add_pie(data = TIprodi_jenkel, label = ~Jenkel, values = ~Freq, name = 'TI', text = 'TI', domain = list(x = c(0.25,0.75), y = c(0,0.6))) fig4 <- fig4 %>% layout(title = 'Responden berdasarkan Program Studi dan Jenis Kelamin', showlegend = T, xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE), yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE)) fig4 ## responden berdasarkan prodi dan semester #SI fig5 <- plot_ly(SIprodi_semester, x = ~Semester, y = ~Freq, type = 'bar') fig5 <- fig5 %>% layout(title = 'Responden Program Studi SI berdasarkan Semester', xaxis = list(title = 'Semester'), yaxis = list(title = 'Jumlah')) fig5 #MI fig6 <- plot_ly(MIprodi_semester, x = ~Semester, y = ~Freq, type = 'bar') fig6 <- fig6 %>% layout(title = 'Responden Program Studi MI berdasarkan Semester', xaxis = list(title = 'Semester'), yaxis = list(title = 'Jumlah')) fig6 #TI fig7 <- plot_ly(TIprodi_semester, x = ~Semester, y = ~Freq, type = 'bar') fig7 <- fig7 %>% layout(title = 'Responden Program Studi TI berdasarkan Semester', xaxis = list(title = 'Semester'), yaxis = list(title = 'Jumlah')) fig7