Baca Data

Data hasil kuesioner

if(!require(googlesheets4)){
  install.packages("googlesheets4")
  library(googlesheets4)
}

gs4_deauth()
form <- "https://docs.google.com/spreadsheets/d/1BctPP-J7X2qz6bm6QTCVDAZDNS3l37G9godqdfIng0Q/edit#gid=752027602"

data <- NULL
data <- data.frame(read_sheet(form))

# membuang timestamp
data <- data[,-1]

# membuang pertanyaan x1-18 yang double
data <- data[,-20]

# Mengganti nama variabel x1 : kolom 2 - 22
colnames(data)[2:22] <- paste0("x1-",1:21)
# Mengganti nama variabel x2 : kolom 35 - 56
colnames(data)[35:56] <- paste0("x2-",1:22)
# Mengganti nama variabel x3 : kolom 23 - 34
colnames(data)[23:34] <- paste0("x3-",1:12)
# Mengganti nama variabel y1 : kolom 57 - 68
colnames(data)[57:68] <- paste0("y1-",1:12)
# Mengganti nama variabel y2 : kolom 69 - 79
colnames(data)[69:79] <- paste0("y2-",1:11)


# Konversi jawaban ke angka 1 hingga 5
for (i in 2:ncol(data)){
  data[,i] <- sapply(data[,i], switch,
                     "Sangat Setuju" = 5,
                     "Setuju" = 4,
                     "Ragu-ragu" = 3,
                     "Tidak Setuju" = 2,
                     "Sangat Tidak Setuju" = 1)
}

Banyaknya responden adalah 215 orang.

Uji Validitas dan Reliabilitas

Menggunakan 30 responden dan package psych

if(!require(psych)){
  install.packages("psych")
  library(psych)
}
set.seed(234)
acak <- sample(1:nrow(data), 30) # memilih 30 responden secara acak
data_30 <- data[acak,]

Pembagian Data

  • Variabel \(X_1\) : kolom 2 - 22
  • Variabel \(X_3\) : kolom 23 - 34
  • Variabel \(X_2\) : kolom 35 - 56
  • Variabel \(Y_1\) : kolom 57 - 68
  • Variabel \(Y_2\) : kolom 69 - 79
x1 <- data_30[,2:22]
x3 <- data_30[,23:34]
x2 <- data_30[,35:56]
y1 <- data_30[,57:68]
y2 <- data_30[,69:79]

Validitas dan Reliabilitas untuk \(X_1\)

ax1 <- alpha(x1, check.keys = T)
ax1
## 
## Reliability analysis   
## Call: alpha(x = x1, check.keys = T)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
##       0.92      0.92    0.99      0.37  12 0.019    4 0.31     0.36
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.88  0.92  0.96
## Duhachek  0.89  0.92  0.96
## 
##  Reliability if an item is dropped:
##       raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## x1-1       0.92      0.92    0.98      0.37  12    0.020 0.034  0.36
## x1-2       0.92      0.92    0.98      0.38  12    0.020 0.033  0.38
## x1-3       0.92      0.92    0.98      0.37  12    0.020 0.034  0.36
## x1-4       0.92      0.93    0.98      0.38  12    0.019 0.033  0.38
## x1-5       0.93      0.93    0.98      0.38  12    0.019 0.030  0.38
## x1-6       0.92      0.92    0.98      0.37  12    0.020 0.035  0.36
## x1-7       0.92      0.92    0.98      0.36  11    0.021 0.034  0.36
## x1-8       0.92      0.92    0.98      0.38  12    0.019 0.032  0.38
## x1-9       0.92      0.92    0.98      0.38  12    0.020 0.033  0.38
## x1-10      0.92      0.92    0.98      0.37  12    0.020 0.032  0.36
## x1-11      0.92      0.92    0.98      0.36  11    0.021 0.034  0.36
## x1-12      0.92      0.92    0.98      0.36  11    0.021 0.034  0.36
## x1-13      0.92      0.92    0.98      0.38  12    0.020 0.033  0.36
## x1-14      0.92      0.92    0.98      0.37  12    0.020 0.034  0.36
## x1-15      0.92      0.92    0.98      0.36  11    0.021 0.032  0.36
## x1-16      0.92      0.92    0.98      0.36  11    0.021 0.031  0.36
## x1-17      0.92      0.92    0.98      0.36  11    0.021 0.031  0.36
## x1-18      0.92      0.92    0.98      0.36  11    0.021 0.033  0.36
## x1-19      0.92      0.92    0.98      0.36  11    0.021 0.032  0.36
## x1-20      0.92      0.92    0.98      0.36  11    0.021 0.032  0.36
## x1-21      0.92      0.92    0.98      0.36  11    0.022 0.033  0.35
## 
##  Item statistics 
##        n raw.r std.r r.cor r.drop mean   sd
## x1-1  30  0.56  0.57  0.57   0.51  4.1 0.48
## x1-2  30  0.47  0.48  0.47   0.41  4.1 0.43
## x1-3  30  0.59  0.59  0.57   0.53  4.1 0.52
## x1-4  30  0.44  0.44  0.43   0.38  4.2 0.48
## x1-5  30  0.44  0.43  0.43   0.38  4.1 0.51
## x1-6  30  0.62  0.63  0.62   0.58  4.0 0.41
## x1-7  30  0.74  0.75  0.75   0.71  4.0 0.41
## x1-8  30  0.49  0.47  0.46   0.42  4.0 0.56
## x1-9  30  0.51  0.51  0.49   0.45  4.1 0.43
## x1-10 30  0.62  0.63  0.63   0.57  4.1 0.45
## x1-11 30  0.68  0.69  0.69   0.63  4.1 0.52
## x1-12 30  0.70  0.69  0.69   0.66  3.9 0.43
## x1-13 30  0.48  0.50  0.49   0.44  4.0 0.37
## x1-14 30  0.62  0.61  0.61   0.57  3.8 0.48
## x1-15 30  0.76  0.76  0.76   0.73  4.0 0.56
## x1-16 30  0.78  0.78  0.78   0.75  4.0 0.56
## x1-17 30  0.77  0.77  0.78   0.73  4.0 0.45
## x1-18 30  0.68  0.68  0.68   0.64  4.0 0.49
## x1-19 30  0.71  0.70  0.70   0.67  4.0 0.49
## x1-20 30  0.78  0.78  0.78   0.75  4.0 0.49
## x1-21 30  0.81  0.80  0.81   0.77  3.9 0.71
## 
## Non missing response frequency for each item
##         2    3    4    5 miss
## x1-1  0.0 0.07 0.77 0.17    0
## x1-2  0.0 0.03 0.80 0.17    0
## x1-3  0.0 0.10 0.73 0.17    0
## x1-4  0.0 0.03 0.73 0.23    0
## x1-5  0.0 0.07 0.73 0.20    0
## x1-6  0.0 0.10 0.83 0.07    0
## x1-7  0.0 0.07 0.83 0.10    0
## x1-8  0.0 0.13 0.70 0.17    0
## x1-9  0.0 0.03 0.80 0.17    0
## x1-10 0.0 0.07 0.80 0.13    0
## x1-11 0.0 0.10 0.73 0.17    0
## x1-12 0.0 0.17 0.80 0.03    0
## x1-13 0.0 0.07 0.87 0.07    0
## x1-14 0.0 0.23 0.73 0.03    0
## x1-15 0.0 0.17 0.70 0.13    0
## x1-16 0.0 0.13 0.70 0.17    0
## x1-17 0.0 0.10 0.80 0.10    0
## x1-18 0.0 0.10 0.77 0.13    0
## x1-19 0.0 0.10 0.77 0.13    0
## x1-20 0.0 0.10 0.77 0.13    0
## x1-21 0.1 0.00 0.80 0.10    0
invalid <- NULL
for (i in (1:ncol(x1))) {
  if (ax1$alpha.drop[i,1] > ax1$total$raw_alpha) {
    invalid <- c(invalid, rownames(ax1$alpha.drop[i,]))
  }
}
invalid
## [1] "x1-4" "x1-5" "x1-8"

Ringkasan Statistik: Hasil uji reliabilitas secara keseluruhan bagi item-item atau instrumen-istrumen penyusun variabel \(X_1\) bisa dilihat pada nilai raw alpha. raw_alpha adalah nilai Cronbach’s \(\alpha\) (jika nilainya ≥ 0.7 atau 0.8 maka item-item penyusun variabel yang diuji memiliki reliabilitas yang baik; Kline (1999)). Terlihat bahwa nilai raw alpha yang didapat adalan 0.92 sehingga bisa dikatakan bahwa secara keseluruhan item-item atau instrumen-istrumen penyusun variabel \(X_1\), dapat dipercaya dan dapat digunakan.

Hasil uji validitas bisa dilihat dengan dengan membandingkan nilai Croncbach’s alpha dengan nilai raw alpha dari setiap isntrumen atau item. Jika nilai raw alpha pada bagian Reliability if an item is dropped: lebih besar dari nilai Cronbach’s alpha, maka item atau instrumen tersebut bisa dikatakan tidak valid karena ketika item atau instrumen tersebut didrop atau dibuang akan membuat nilai Cronbach’s alpha meningkat. Item yang tidak valid:

Validitas dan Reliabilitas untuk \(X_2\)

ax2 <- alpha(x2, check.keys = T)
## Warning in cor.smooth(r): Matrix was not positive definite, smoothing was done
ax2
## 
## Reliability analysis   
## Call: alpha(x = x2, check.keys = T)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
##       0.97      0.97       1      0.58  30 0.0086  3.8 0.48     0.59
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.95  0.97  0.98
## Duhachek  0.95  0.97  0.98
## 
##  Reliability if an item is dropped:
##       raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## x2-1       0.96      0.97    1.00      0.57  28   0.0094 0.019  0.58
## x2-2       0.96      0.97    1.00      0.58  29   0.0090 0.019  0.59
## x2-3       0.97      0.97    1.00      0.59  30   0.0086 0.018  0.59
## x2-4       0.96      0.97    1.00      0.58  29   0.0090 0.019  0.59
## x2-5       0.96      0.97    1.00      0.57  28   0.0093 0.019  0.59
## x2-6       0.96      0.97    1.00      0.57  28   0.0094 0.019  0.58
## x2-7       0.97      0.97    1.00      0.59  30   0.0087 0.018  0.61
## x2-8       0.96      0.97    1.00      0.58  28   0.0092 0.019  0.59
## x2-9       0.96      0.97    0.99      0.58  29   0.0090 0.020  0.59
## x2-10      0.96      0.97    1.00      0.58  29   0.0091 0.020  0.58
## x2-11      0.97      0.97    1.00      0.59  30   0.0088 0.019  0.60
## x2-12      0.97      0.97    1.00      0.59  30   0.0088 0.018  0.60
## x2-13      0.97      0.97    1.00      0.59  30   0.0088 0.018  0.61
## x2-14      0.97      0.97    1.00      0.59  30   0.0088 0.019  0.60
## x2-15      0.97      0.97    1.00      0.58  29   0.0089 0.020  0.59
## x2-16      0.97      0.97    1.00      0.58  30   0.0089 0.019  0.60
## x2-17      0.97      0.97    1.00      0.58  29   0.0090 0.020  0.59
## x2-18      0.96      0.97    1.00      0.57  28   0.0092 0.019  0.58
## x2-19      0.97      0.97    1.00      0.59  30   0.0085 0.018  0.61
## x2-20      0.96      0.97    1.00      0.57  28   0.0093 0.019  0.58
## x2-21      0.96      0.97    1.00      0.57  28   0.0095 0.019  0.59
## x2-22      0.96      0.97    1.00      0.58  29   0.0092 0.019  0.58
## 
##  Item statistics 
##        n raw.r std.r r.cor r.drop mean   sd
## x2-1  30  0.90  0.90  0.90   0.89  3.8 0.63
## x2-2  30  0.79  0.78  0.78   0.76  3.7 0.71
## x2-3  30  0.70  0.70  0.70   0.66  3.7 0.78
## x2-4  30  0.78  0.77  0.77   0.76  3.7 0.64
## x2-5  30  0.86  0.85  0.85   0.84  3.7 0.69
## x2-6  30  0.88  0.88  0.88   0.87  3.8 0.66
## x2-7  30  0.63  0.63  0.63   0.59  4.0 0.56
## x2-8  30  0.84  0.83  0.83   0.82  3.8 0.68
## x2-9  30  0.78  0.78  0.78   0.75  3.8 0.65
## x2-10 30  0.82  0.82  0.82   0.80  3.8 0.55
## x2-11 30  0.70  0.71  0.71   0.67  3.9 0.61
## x2-12 30  0.70  0.70  0.70   0.67  3.8 0.61
## x2-13 30  0.64  0.65  0.65   0.61  3.9 0.45
## x2-14 30  0.67  0.69  0.69   0.65  4.1 0.52
## x2-15 30  0.72  0.73  0.73   0.69  4.1 0.45
## x2-16 30  0.71  0.71  0.71   0.68  3.8 0.53
## x2-17 30  0.78  0.78  0.78   0.76  3.9 0.51
## x2-18 30  0.89  0.89  0.89   0.88  4.0 0.49
## x2-19 30  0.68  0.66  0.66   0.63  3.7 0.83
## x2-20 30  0.85  0.84  0.84   0.83  3.8 0.66
## x2-21 30  0.89  0.88  0.88   0.87  3.9 0.76
## x2-22 30  0.83  0.82  0.82   0.81  4.0 0.64
## 
## Non missing response frequency for each item
##          2    3    4    5 miss
## x2-1  0.00 0.33 0.57 0.10    0
## x2-2  0.03 0.37 0.50 0.10    0
## x2-3  0.10 0.17 0.63 0.10    0
## x2-4  0.03 0.27 0.63 0.07    0
## x2-5  0.03 0.30 0.57 0.10    0
## x2-6  0.03 0.23 0.63 0.10    0
## x2-7  0.00 0.17 0.70 0.13    0
## x2-8  0.03 0.27 0.60 0.10    0
## x2-9  0.03 0.20 0.67 0.10    0
## x2-10 0.00 0.27 0.67 0.07    0
## x2-11 0.00 0.23 0.63 0.13    0
## x2-12 0.00 0.30 0.60 0.10    0
## x2-13 0.00 0.13 0.80 0.07    0
## x2-14 0.00 0.10 0.73 0.17    0
## x2-15 0.00 0.07 0.80 0.13    0
## x2-16 0.00 0.23 0.70 0.07    0
## x2-17 0.00 0.20 0.73 0.07    0
## x2-18 0.00 0.13 0.77 0.10    0
## x2-19 0.10 0.20 0.57 0.13    0
## x2-20 0.03 0.23 0.63 0.10    0
## x2-21 0.03 0.23 0.53 0.20    0
## x2-22 0.00 0.20 0.60 0.20    0
invalid <- NULL
for (i in (1:ncol(x2))) {
  if (ax2$alpha.drop[i,1] > ax2$total$raw_alpha) {
    invalid <- c(invalid, rownames(ax2$alpha.drop[i,]))
  }
}
invalid
## [1] "x2-19"

Ringkasan Statistik: Hasil uji reliabilitas secara keseluruhan bagi item-item atau instrumen-istrumen penyusun variabel \(X_2\) bisa dilihat pada nilai raw alpha. raw_alpha adalah nilai Cronbach’s \(\alpha\) (jika nilainya ≥ 0.7 atau 0.8 maka item-item penyusun variabel yang diuji memiliki reliabilitas yang baik; Kline (1999)). Terlihat bahwa nilai raw alpha yang didapat adalan 0.97 sehingga bisa dikatakan bahwa secara keseluruhan item-item atau instrumen-istrumen penyusun variabel \(X_2\), dapat dipercaya dan dapat digunakan.

Hasil uji validitas bisa dilihat dengan dengan membandingkan nilai Croncbach’s alpha dengan nilai raw alpha dari setiap isntrumen atau item. Jika nilai raw alpha pada bagian Reliability if an item is dropped: lebih besar dari nilai Cronbach’s alpha, maka item atau instrumen tersebut bisa dikatakan tidak valid karena ketika item atau instrumen tersebut didrop atau dibuang akan membuat nilai Cronbach’s alpha meningkat. Item yang tidak valid:

Validitas dan Reliabilitas untuk \(X_3\)

ax3 <- alpha(x3, check.keys = T)
ax3
## 
## Reliability analysis   
## Call: alpha(x = x3, check.keys = T)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N  ase mean   sd median_r
##       0.92      0.92    0.98      0.49  11 0.02  3.8 0.64     0.51
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.87  0.92  0.96
## Duhachek  0.88  0.92  0.96
## 
##  Reliability if an item is dropped:
##       raw_alpha std.alpha G6(smc) average_r  S/N alpha se var.r med.r
## x3-1       0.92      0.92    0.98      0.52 12.0    0.019 0.045  0.57
## x3-2       0.93      0.93    0.98      0.54 13.0    0.019 0.032  0.57
## x3-3       0.91      0.91    0.97      0.49 10.5    0.022 0.049  0.51
## x3-4       0.91      0.90    0.97      0.46  9.4    0.023 0.049  0.48
## x3-5       0.91      0.91    0.96      0.48 10.1    0.023 0.046  0.51
## x3-6       0.91      0.91    0.97      0.47  9.9    0.023 0.046  0.49
## x3-7       0.92      0.92    0.98      0.50 11.1    0.021 0.046  0.53
## x3-8       0.91      0.91    0.97      0.47  9.8    0.023 0.048  0.49
## x3-9       0.91      0.91    0.97      0.46  9.5    0.025 0.043  0.49
## x3-10      0.91      0.91    0.97      0.47  9.9    0.023 0.046  0.49
## x3-11      0.91      0.91    0.97      0.48 10.3    0.022 0.045  0.49
## x3-12      0.91      0.91    0.97      0.48 10.3    0.022 0.048  0.51
## 
##  Item statistics 
##        n raw.r std.r r.cor r.drop mean   sd
## x3-1  30  0.49  0.52  0.49   0.41  3.9 0.76
## x3-2  30  0.34  0.38  0.36   0.26  4.1 0.68
## x3-3  30  0.71  0.71  0.70   0.66  3.9 0.82
## x3-4  30  0.88  0.89  0.89   0.85  3.9 0.78
## x3-5  30  0.80  0.78  0.78   0.74  3.6 1.04
## x3-6  30  0.84  0.82  0.83   0.80  3.6 0.94
## x3-7  30  0.64  0.63  0.61   0.56  3.7 0.87
## x3-8  30  0.82  0.83  0.81   0.79  3.8 0.76
## x3-9  30  0.89  0.87  0.87   0.85  3.4 1.14
## x3-10 30  0.80  0.81  0.81   0.76  3.8 0.81
## x3-11 30  0.77  0.74  0.74   0.71  3.4 1.04
## x3-12 30  0.74  0.76  0.75   0.69  3.9 0.73
## 
## Non missing response frequency for each item
##          1    2    3    4    5 miss
## x3-1  0.00 0.07 0.13 0.63 0.17    0
## x3-2  0.00 0.03 0.07 0.63 0.27    0
## x3-3  0.00 0.10 0.10 0.63 0.17    0
## x3-4  0.00 0.07 0.17 0.60 0.17    0
## x3-5  0.03 0.17 0.10 0.57 0.13    0
## x3-6  0.00 0.17 0.23 0.47 0.13    0
## x3-7  0.00 0.13 0.13 0.60 0.13    0
## x3-8  0.00 0.07 0.20 0.60 0.13    0
## x3-9  0.03 0.23 0.17 0.40 0.17    0
## x3-10 0.00 0.07 0.23 0.53 0.17    0
## x3-11 0.03 0.20 0.17 0.50 0.10    0
## x3-12 0.00 0.03 0.23 0.57 0.17    0
invalid <- NULL
for (i in (1:ncol(x3))) {
  if (ax3$alpha.drop[i,1] > ax3$total$raw_alpha) {
    invalid <- c(invalid, rownames(ax3$alpha.drop[i,]))
  }
}
invalid
## [1] "x3-1" "x3-2"

Ringkasan Statistik: Hasil uji reliabilitas secara keseluruhan bagi item-item atau instrumen-istrumen penyusun variabel \(X_3\) bisa dilihat pada nilai raw alpha. raw_alpha adalah nilai Cronbach’s \(\alpha\) (jika nilainya ≥ 0.7 atau 0.8 maka item-item penyusun variabel yang diuji memiliki reliabilitas yang baik; Kline (1999)). Terlihat bahwa nilai raw alpha yang didapat adalan 0.92 sehingga bisa dikatakan bahwa secara keseluruhan item-item atau instrumen-istrumen penyusun variabel \(X_3\), dapat dipercaya dan dapat digunakan.

Hasil uji validitas bisa dilihat dengan dengan membandingkan nilai Croncbach’s alpha dengan nilai raw alpha dari setiap isntrumen atau item. Jika nilai raw alpha pada bagian Reliability if an item is dropped: lebih besar dari nilai Cronbach’s alpha, maka item atau instrumen tersebut bisa dikatakan tidak valid karena ketika item atau instrumen tersebut didrop atau dibuang akan membuat nilai Cronbach’s alpha meningkat. Item yang tidak valid:

Validitas dan Reliabilitas untuk \(Y_1\)

ay1 <- alpha(y1, check.keys = T)
ay1
## 
## Reliability analysis   
## Call: alpha(x = y1, check.keys = T)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
##       0.89       0.9    0.95      0.43 8.9 0.028  3.8 0.53     0.45
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.82  0.89  0.94
## Duhachek  0.84  0.89  0.95
## 
##  Reliability if an item is dropped:
##       raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## y1-1       0.87      0.89    0.95      0.41 7.8    0.033 0.046  0.43
## y1-2       0.88      0.89    0.95      0.42 7.9    0.032 0.047  0.46
## y1-3       0.87      0.88    0.94      0.41 7.7    0.034 0.041  0.43
## y1-4       0.88      0.89    0.95      0.44 8.5    0.031 0.040  0.43
## y1-5       0.89      0.90    0.95      0.45 9.0    0.028 0.043  0.47
## y1-6       0.89      0.90    0.95      0.44 8.7    0.028 0.045  0.46
## y1-7       0.89      0.89    0.95      0.43 8.3    0.028 0.045  0.46
## y1-8       0.89      0.89    0.95      0.43 8.2    0.028 0.041  0.46
## y1-9       0.89      0.89    0.95      0.43 8.2    0.028 0.042  0.46
## y1-10      0.88      0.89    0.95      0.42 7.8    0.031 0.049  0.39
## y1-11      0.88      0.89    0.94      0.43 8.2    0.030 0.045  0.43
## y1-12      0.88      0.88    0.94      0.41 7.7    0.030 0.045  0.39
## 
##  Item statistics 
##        n raw.r std.r r.cor r.drop mean   sd
## y1-1  30  0.82  0.77  0.75   0.76  3.4 1.00
## y1-2  30  0.77  0.73  0.71   0.71  3.8 0.77
## y1-3  30  0.86  0.79  0.79   0.81  3.5 0.97
## y1-4  30  0.71  0.62  0.61   0.62  3.8 0.91
## y1-5  30  0.56  0.52  0.48   0.46  3.6 0.85
## y1-6  30  0.50  0.59  0.54   0.43  4.0 0.56
## y1-7  30  0.57  0.67  0.66   0.51  4.2 0.53
## y1-8  30  0.57  0.68  0.67   0.52  4.0 0.49
## y1-9  30  0.58  0.67  0.66   0.51  4.0 0.59
## y1-10 30  0.73  0.76  0.74   0.68  3.9 0.68
## y1-11 30  0.74  0.69  0.68   0.64  3.4 1.10
## y1-12 30  0.73  0.78  0.78   0.69  3.9 0.57
## 
## Non missing response frequency for each item
##          1    2    3    4    5 miss
## y1-1  0.00 0.23 0.27 0.37 0.13    0
## y1-2  0.00 0.07 0.23 0.57 0.13    0
## y1-3  0.03 0.13 0.23 0.50 0.10    0
## y1-4  0.03 0.07 0.10 0.63 0.17    0
## y1-5  0.00 0.10 0.30 0.47 0.13    0
## y1-6  0.00 0.03 0.07 0.80 0.10    0
## y1-7  0.00 0.00 0.07 0.70 0.23    0
## y1-8  0.00 0.00 0.10 0.77 0.13    0
## y1-9  0.00 0.00 0.17 0.67 0.17    0
## y1-10 0.00 0.03 0.20 0.63 0.13    0
## y1-11 0.03 0.27 0.07 0.53 0.10    0
## y1-12 0.00 0.00 0.23 0.67 0.10    0
invalid <- NULL
for (i in (1:ncol(y1))) {
  if (ay1$alpha.drop[i,1] > ay1$total$raw_alpha) {
    invalid <- c(invalid, rownames(ay1$alpha.drop[i,]))
  }
}
invalid
## NULL

Ringkasan Statistik: Hasil uji reliabilitas secara keseluruhan bagi item-item atau instrumen-istrumen penyusun variabel \(Y_1\) bisa dilihat pada nilai raw alpha. raw_alpha adalah nilai Cronbach’s \(\alpha\) (jika nilainya ≥ 0.7 atau 0.8 maka item-item penyusun variabel yang diuji memiliki reliabilitas yang baik; Kline (1999)). Terlihat bahwa nilai raw alpha yang didapat adalan 0.89 sehingga bisa dikatakan bahwa secara keseluruhan item-item atau instrumen-istrumen penyusun variabel \(Y_1\), dapat dipercaya dan dapat digunakan.

Hasil uji validitas bisa dilihat dengan dengan membandingkan nilai Croncbach’s alpha dengan nilai raw alpha dari setiap isntrumen atau item. Jika nilai raw alpha pada bagian Reliability if an item is dropped: lebih besar dari nilai Cronbach’s alpha, maka item atau instrumen tersebut bisa dikatakan tidak valid karena ketika item atau instrumen tersebut didrop atau dibuang akan membuat nilai Cronbach’s alpha meningkat. Item yang tidak valid:

Validitas dan Reliabilitas untuk \(Y_2\)

ay2 <- alpha(y2, check.keys = T)
ay2
## 
## Reliability analysis   
## Call: alpha(x = y2, check.keys = T)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
##       0.82      0.84    0.89      0.32 5.2 0.048  3.7 0.47      0.3
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.71  0.82  0.90
## Duhachek  0.73  0.82  0.92
## 
##  Reliability if an item is dropped:
##       raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## y2-1       0.81      0.83    0.88      0.33 4.8    0.052 0.027  0.31
## y2-2       0.81      0.83    0.89      0.33 5.0    0.051 0.025  0.31
## y2-3       0.82      0.83    0.88      0.33 5.0    0.050 0.026  0.34
## y2-4       0.81      0.83    0.87      0.32 4.8    0.051 0.024  0.30
## y2-5       0.80      0.81    0.86      0.31 4.4    0.054 0.023  0.29
## y2-6       0.80      0.81    0.87      0.30 4.3    0.053 0.019  0.30
## y2-7       0.82      0.84    0.88      0.34 5.1    0.048 0.025  0.31
## y2-8       0.80      0.82    0.87      0.31 4.4    0.055 0.022  0.28
## y2-9       0.82      0.84    0.89      0.34 5.1    0.050 0.023  0.31
## y2-10      0.81      0.83    0.88      0.32 4.8    0.051 0.024  0.31
## y2-11      0.80      0.81    0.86      0.30 4.3    0.054 0.022  0.28
## 
##  Item statistics 
##        n raw.r std.r r.cor r.drop mean   sd
## y2-1  30  0.63  0.58  0.53   0.50  3.2 0.96
## y2-2  30  0.53  0.54  0.47   0.43  3.7 0.61
## y2-3  30  0.58  0.53  0.47   0.44  3.5 0.97
## y2-4  30  0.63  0.60  0.59   0.49  3.3 0.99
## y2-5  30  0.70  0.72  0.72   0.63  3.8 0.61
## y2-6  30  0.70  0.74  0.74   0.64  3.9 0.52
## y2-7  30  0.53  0.51  0.46   0.39  3.7 0.88
## y2-8  30  0.71  0.71  0.69   0.60  3.7 0.94
## y2-9  30  0.48  0.51  0.45   0.38  4.2 0.61
## y2-10 30  0.56  0.60  0.57   0.47  3.8 0.63
## y2-11 30  0.71  0.74  0.74   0.63  3.9 0.64
## 
## Non missing response frequency for each item
##          1    2    3    4    5 miss
## y2-1  0.03 0.23 0.27 0.43 0.03    0
## y2-2  0.00 0.00 0.40 0.53 0.07    0
## y2-3  0.03 0.13 0.27 0.47 0.10    0
## y2-4  0.03 0.20 0.27 0.43 0.07    0
## y2-5  0.00 0.00 0.30 0.60 0.10    0
## y2-6  0.00 0.00 0.17 0.73 0.10    0
## y2-7  0.03 0.03 0.30 0.50 0.13    0
## y2-8  0.03 0.07 0.20 0.53 0.17    0
## y2-9  0.00 0.00 0.10 0.60 0.30    0
## y2-10 0.00 0.03 0.23 0.67 0.07    0
## y2-11 0.00 0.00 0.23 0.60 0.17    0
invalid <- NULL
for (i in (1:ncol(y2))) {
  if (ay2$alpha.drop[i,1] > ay2$total$raw_alpha) {
    invalid <- c(invalid, rownames(ay2$alpha.drop[i,]))
  }
}
invalid
## NULL

Ringkasan Statistik: Hasil uji reliabilitas secara keseluruhan bagi item-item atau instrumen-istrumen penyusun variabel \(Y_2\) bisa dilihat pada nilai raw alpha. raw_alpha adalah nilai Cronbach’s \(\alpha\) (jika nilainya ≥ 0.7 atau 0.8 maka item-item penyusun variabel yang diuji memiliki reliabilitas yang baik; Kline (1999)). Terlihat bahwa nilai raw alpha yang didapat adalan 0.82 sehingga bisa dikatakan bahwa secara keseluruhan item-item atau instrumen-istrumen penyusun variabel \(Y_2\), dapat dipercaya dan dapat digunakan.

Hasil uji validitas bisa dilihat dengan dengan membandingkan nilai Croncbach’s alpha dengan nilai raw alpha dari setiap isntrumen atau item. Jika nilai raw alpha pada bagian Reliability if an item is dropped: lebih besar dari nilai Cronbach’s alpha, maka item atau instrumen tersebut bisa dikatakan tidak valid karena ketika item atau instrumen tersebut didrop atau dibuang akan membuat nilai Cronbach’s alpha meningkat. Item yang tidak valid:

Pembagian Data

Variabel \(X_1\) terdiri atas \(X_{11}\), \(X_{12}\), \(X_{13}\), dan \(X_{14}\).

Variabel \(X_2\) terdiri atas \(X_{21}\), \(X_{22}\), \(X_{23}\),

No Variabel Indikator Item
Pendidikan Kewirausahaan (\(X_1\))
  1. Mengetahui tentang apa
x1.1 s/d x1.5
  1. Mengetahui tentang mengapa
x1.6 s/d x1.10
  1. Mengetahui tentang siapa
x1.11 s/d x1.16
  1. Mengetahui tentang bagaimana
x1.17 s/d x1.21
Efikasi Diri (\(X_2\))
  1. Pemasaran
x2.1 s/d x2.6
  1. Inovasi
x2.7 s/d x2.10
  1. Manajemen
x2.11 s/d x2.15
  1. Resiko
x2.16 s/d x2.19
  1. Pengendalian keuangan
x2.20 s/d x2.22
Peran Orang Tua (\(X_3\))
  1. Kesediaan berdiskusi
x3.1 s/d x3.4
  1. Dukungan dana/moral
x3.5 s/d x3.8
  1. Keteladanan
x3.9 s/d x3.12
Sikap berwirausaha (\(Y_1\))
  1. Mendapatkan uang
y1.1 s/d y1.4
  1. Menyikapi perubahan
y1.5 s/d y1.8
  1. Menyikapi persaingan
y1.9 s/d y1.12
Niat berusaha mahasiswa (\(Y_2\))
  1. Keterlibatan dalam program kewirausahaan di kampus
y2.1 s/d y2.2
  1. Memulai berwirausaha sendiri setelah lulus
y2.3 s/d y2.5
  1. Bekerja dengan partner yang baik setelah lulus
y2.6 s/d y2.8
  1. Memulai berwirausaha jika ada dukungan pendanaan
y2.9 s/d y2.11
x11 <- apply(data[, 2:6], 1, mean)
x12 <- apply(data[, 7:11], 1, mean)
x13 <- apply(data[, 12:17], 1, mean)
x14 <- apply(data[, 17:21], 1, mean)

x21 <- apply(data[, 35:40], 1, mean)
x22 <- apply(data[, 41:44], 1, mean)
x23 <- apply(data[, 45:49], 1, mean)
x24 <- apply(data[, 50:53], 1, mean)
x25 <- apply(data[, 54:56], 1, mean)

x31 <- apply(data[, 23:26], 1, mean)
x32 <- apply(data[, 27:30], 1, mean)
x33 <- apply(data[, 31:34], 1, mean)

y11 <- apply(data[, 57:60], 1, mean)
y12 <- apply(data[, 61:64], 1, mean)
y13 <- apply(data[, 65:68], 1, mean)

y21 <- apply(data[, 69:70], 1, mean)
y22 <- apply(data[, 71:73], 1, mean)
y23 <- apply(data[, 74:76], 1, mean)
y24 <- apply(data[, 77:79], 1, mean)

dat <- data.frame(x11, x12, x13, x14,
                 x21, x22, x23, x24, x25,
                 x31, x32, x33,
                 y11, y12, y13,
                 y21, y22, y23, y24)

SEM

Confirmatory Factor Analysis (CFA) \(X_1\)

Package yang digunakan: lavaan

if(!require(lavaan)){
  install.packages("lavaan")
  library(lavaan)
}

if(!require(tidySEM)){
  install.packages("tidySEM")
  library(tidySEM)
}

Realibilitas dan validitas

dat_x1 <- data.frame(x11,x12,x13,x14)
ax1 <- alpha(dat_x1, check.keys = T)
ax1
## 
## Reliability analysis   
## Call: alpha(x = dat_x1, check.keys = T)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
##       0.94      0.94    0.94       0.8  16 0.0067  4.2 0.47      0.8
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.93  0.94  0.95
## Duhachek  0.93  0.94  0.95
## 
##  Reliability if an item is dropped:
##     raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
## x11      0.93      0.93    0.91      0.81  13   0.0086 0.0032  0.83
## x12      0.92      0.92    0.89      0.79  11   0.0096 0.0035  0.76
## x13      0.93      0.93    0.90      0.81  13   0.0088 0.0022  0.83
## x14      0.91      0.92    0.88      0.78  11   0.0102 0.0024  0.76
## 
##  Item statistics 
##       n raw.r std.r r.cor r.drop mean   sd
## x11 215  0.91  0.91  0.87   0.84  4.2 0.49
## x12 215  0.93  0.93  0.90   0.87  4.2 0.52
## x13 215  0.92  0.91  0.88   0.85  4.1 0.52
## x14 215  0.94  0.93  0.92   0.88  4.1 0.52
invalid <- NULL
for (i in (1:ncol(dat_x1))) {
  if (ax1$alpha.drop[i,1] > ax1$total$raw_alpha) {
    invalid <- c(invalid, rownames(ax1$alpha.drop[i,]))
  }
}
invalid
## NULL

Nilai Cronbach Alfa: 0.94

Semua item valid

mod1 <- 'x1 =~ x11 + x12 + x13 + x14'
fit <- cfa(mod1, data = dat)
summary(fit, fit.measures = T)
## lavaan 0.6-12 ended normally after 27 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                         8
## 
##   Number of observations                           215
## 
## Model Test User Model:
##                                                       
##   Test statistic                                56.167
##   Degrees of freedom                                 2
##   P-value (Chi-square)                           0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                               835.310
##   Degrees of freedom                                 6
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.935
##   Tucker-Lewis Index (TLI)                       0.804
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)               -250.366
##   Loglikelihood unrestricted model (H1)       -222.283
##                                                       
##   Akaike (AIC)                                 516.733
##   Bayesian (BIC)                               543.698
##   Sample-size adjusted Bayesian (BIC)          518.348
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.355
##   90 Percent confidence interval - lower         0.278
##   90 Percent confidence interval - upper         0.438
##   P-value RMSEA <= 0.05                          0.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.031
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   x1 =~                                               
##     x11               1.000                           
##     x12               1.108    0.061   18.254    0.000
##     x13               1.109    0.062   17.766    0.000
##     x14               1.149    0.060   19.307    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .x11               0.061    0.007    8.536    0.000
##    .x12               0.050    0.007    7.596    0.000
##    .x13               0.058    0.007    7.976    0.000
##    .x14               0.038    0.006    6.417    0.000
##     x1                0.174    0.022    7.820    0.000
standardizedSolution(fit)
lay <- get_layout("", "", "x1", "", "",
                  "x11","x12","","x13","x14", rows = 2)

graph_sem(fit, layout = lay)

Confirmatory Factor Analysis (CFA) \(X_2\)

Realibilitas dan validitas

dat_x2 <- data.frame(x21,x22,x23,x24,x25)
ax2 <- alpha(dat_x2, check.keys = T)
ax2
## 
## Reliability analysis   
## Call: alpha(x = dat_x2, check.keys = T)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
##       0.96      0.96    0.95      0.83  24 0.0043    4 0.59     0.82
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.95  0.96  0.97
## Duhachek  0.95  0.96  0.97
## 
##  Reliability if an item is dropped:
##     raw_alpha std.alpha G6(smc) average_r S/N alpha se   var.r med.r
## x21      0.95      0.95    0.94      0.84  20   0.0054 0.00035  0.83
## x22      0.95      0.95    0.94      0.83  20   0.0056 0.00054  0.83
## x23      0.95      0.95    0.94      0.83  19   0.0056 0.00050  0.82
## x24      0.95      0.95    0.94      0.83  19   0.0055 0.00034  0.82
## x25      0.95      0.95    0.94      0.83  20   0.0055 0.00058  0.82
## 
##  Item statistics 
##       n raw.r std.r r.cor r.drop mean   sd
## x21 215  0.93  0.92  0.90   0.88  3.9 0.69
## x22 215  0.93  0.93  0.91   0.89  3.9 0.67
## x23 215  0.93  0.94  0.92   0.90  4.1 0.59
## x24 215  0.93  0.93  0.91   0.89  4.0 0.57
## x25 215  0.93  0.93  0.91   0.89  4.0 0.66
invalid <- NULL
for (i in (1:ncol(dat_x2))) {
  if (ax2$alpha.drop[i,1] > ax2$total$raw_alpha) {
    invalid <- c(invalid, rownames(ax2$alpha.drop[i,]))
  }
}
invalid
## NULL

Nilai Cronbach Alfa: 0.96

Semua item valid

mod2 <- 'x2 =~ x21 + x22 + x23 + x24 + x25'
fit <- cfa(mod2, data = dat)
summary(fit, fit.measures = T)
## lavaan 0.6-12 ended normally after 35 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        10
## 
##   Number of observations                           215
## 
## Model Test User Model:
##                                                       
##   Test statistic                                22.092
##   Degrees of freedom                                 5
##   P-value (Chi-square)                           0.001
## 
## Model Test Baseline Model:
## 
##   Test statistic                              1235.997
##   Degrees of freedom                                10
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.986
##   Tucker-Lewis Index (TLI)                       0.972
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)               -426.060
##   Loglikelihood unrestricted model (H1)       -415.014
##                                                       
##   Akaike (AIC)                                 872.120
##   Bayesian (BIC)                               905.827
##   Sample-size adjusted Bayesian (BIC)          874.139
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.126
##   90 Percent confidence interval - lower         0.075
##   90 Percent confidence interval - upper         0.182
##   P-value RMSEA <= 0.05                          0.009
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.015
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   x2 =~                                               
##     x21               1.000                           
##     x22               0.984    0.047   21.137    0.000
##     x23               0.890    0.040   22.096    0.000
##     x24               0.853    0.039   21.700    0.000
##     x25               0.973    0.046   21.370    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .x21               0.090    0.010    8.565    0.000
##    .x22               0.078    0.009    8.364    0.000
##    .x23               0.052    0.007    7.896    0.000
##    .x24               0.052    0.006    8.105    0.000
##    .x25               0.073    0.009    8.262    0.000
##     x2                0.377    0.045    8.459    0.000
standardizedSolution(fit)
lay <- get_layout("", "", "x2", "", "",
                  "x21","x22","x23","x24","x25", rows = 2)
graph_sem(fit)

Confirmatory Factor Analysis (CFA) \(X_3\)

Realibilitas dan validitas

dat_x3 <- data.frame(x31,x32,x33)
ax3 <- alpha(dat_x3, check.keys = T)
ax3
## 
## Reliability analysis   
## Call: alpha(x = dat_x3, check.keys = T)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
##       0.88      0.88    0.84       0.7 7.1 0.014  3.8 0.69     0.65
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.84  0.88   0.9
## Duhachek  0.85  0.88   0.9
## 
##  Reliability if an item is dropped:
##     raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## x31      0.90      0.90    0.81      0.81 8.7    0.014    NA  0.81
## x32      0.78      0.79    0.65      0.65 3.7    0.029    NA  0.65
## x33      0.77      0.78    0.65      0.65 3.6    0.030    NA  0.65
## 
##  Item statistics 
##       n raw.r std.r r.cor r.drop mean   sd
## x31 215  0.83  0.85  0.71   0.68  4.0 0.67
## x32 215  0.93  0.92  0.87   0.81  3.7 0.83
## x33 215  0.93  0.92  0.87   0.82  3.7 0.82
invalid <- NULL
for (i in (1:ncol(dat_x3))) {
  if (ax3$alpha.drop[i,1] > ax3$total$raw_alpha) {
    invalid <- c(invalid, rownames(ax3$alpha.drop[i,]))
  }
}
invalid
## [1] "x31"

Nilai Cronbach Alfa: 0.88

\(X_{31}\) tidak valid dan dikeluarkan

dat_x3 <- data.frame(x32,x33)
ax3 <- alpha(dat_x3, check.keys = T)
## Number of categories should be increased  in order to count frequencies.

Nilai Cronbach Alfa baru: 0.9

mod3 <- 'x3 =~ x31 + x32 + x33'
fit <- cfa(mod3, data = dat)
summary(fit, fit.measures = T)
## lavaan 0.6-12 ended normally after 17 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                         6
## 
##   Number of observations                           215
## 
## Model Test User Model:
##                                                       
##   Test statistic                                 0.000
##   Degrees of freedom                                 0
## 
## Model Test Baseline Model:
## 
##   Test statistic                               366.193
##   Degrees of freedom                                 3
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    1.000
##   Tucker-Lewis Index (TLI)                       1.000
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)               -559.878
##   Loglikelihood unrestricted model (H1)       -559.878
##                                                       
##   Akaike (AIC)                                1131.756
##   Bayesian (BIC)                              1151.980
##   Sample-size adjusted Bayesian (BIC)         1132.967
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.000
##   90 Percent confidence interval - lower         0.000
##   90 Percent confidence interval - upper         0.000
##   P-value RMSEA <= 0.05                             NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   x3 =~                                               
##     x31               1.000                           
##     x32               1.564    0.128   12.216    0.000
##     x33               1.546    0.126   12.220    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .x31               0.214    0.023    9.188    0.000
##    .x32               0.132    0.029    4.508    0.000
##    .x33               0.120    0.028    4.250    0.000
##     x3                0.227    0.039    5.864    0.000
standardizedSolution(fit)
graph_sem(fit)

Confirmatory Factor Analysis (CFA) \(Y_1\)

Realibilitas dan validitas

dat_y1 <- data.frame(y11,y12,y13)
ay1 <- alpha(dat_y1, check.keys = T)
ay1
## 
## Reliability analysis   
## Call: alpha(x = dat_y1, check.keys = T)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N  ase mean   sd median_r
##       0.83      0.84    0.78      0.63 5.2 0.02  3.8 0.58     0.62
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.78  0.83  0.86
## Duhachek  0.79  0.83  0.87
## 
##  Reliability if an item is dropped:
##     raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## y11      0.80      0.81    0.68      0.68 4.2    0.027    NA  0.68
## y12      0.76      0.76    0.62      0.62 3.2    0.032    NA  0.62
## y13      0.73      0.76    0.61      0.61 3.1    0.034    NA  0.61
## 
##  Item statistics 
##       n raw.r std.r r.cor r.drop mean   sd
## y11 215  0.88  0.85  0.73   0.67  3.8 0.76
## y12 215  0.85  0.88  0.78   0.71  4.0 0.56
## y13 215  0.88  0.88  0.79   0.71  3.7 0.68
invalid <- NULL
for (i in (1:ncol(dat_y1))) {
  if (ay1$alpha.drop[i,1] > ay1$total$raw_alpha) {
    invalid <- c(invalid, rownames(ay1$alpha.drop[i,]))
  }
}
invalid
## NULL

Nilai Cronbach Alfa: 0.83 Semua item valid

mod4 <- 'y1 =~ y11 + y12 + y13'
fit <- cfa(mod4, data = dat)
summary(fit, fit.measures = T)
## lavaan 0.6-12 ended normally after 20 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                         6
## 
##   Number of observations                           215
## 
## Model Test User Model:
##                                                       
##   Test statistic                                 0.000
##   Degrees of freedom                                 0
## 
## Model Test Baseline Model:
## 
##   Test statistic                               259.710
##   Degrees of freedom                                 3
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    1.000
##   Tucker-Lewis Index (TLI)                       1.000
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)               -517.183
##   Loglikelihood unrestricted model (H1)       -517.183
##                                                       
##   Akaike (AIC)                                1046.365
##   Bayesian (BIC)                              1066.589
##   Sample-size adjusted Bayesian (BIC)         1047.576
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.000
##   90 Percent confidence interval - lower         0.000
##   90 Percent confidence interval - upper         0.000
##   P-value RMSEA <= 0.05                             NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   y1 =~                                               
##     y11               1.000                           
##     y12               0.799    0.075   10.658    0.000
##     y13               0.991    0.093   10.679    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .y11               0.259    0.033    7.792    0.000
##    .y12               0.102    0.017    5.973    0.000
##    .y13               0.145    0.026    5.646    0.000
##     y1                0.322    0.055    5.888    0.000
standardizedSolution(fit)
graph_sem(fit)

Confirmatory Factor Analysis (CFA) \(Y_2\)

Realibilitas dan validitas

dat_y2 <- data.frame(y21,y22,y23,y24)
ay2 <- alpha(dat_y2, check.keys = T)
ay2
## 
## Reliability analysis   
## Call: alpha(x = dat_y2, check.keys = T)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N  ase mean   sd median_r
##       0.74      0.74    0.74      0.42 2.9 0.03  3.6 0.57     0.41
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.67  0.74  0.79
## Duhachek  0.68  0.74  0.79
## 
##  Reliability if an item is dropped:
##     raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
## y21      0.64      0.66    0.63      0.39 1.9    0.044 0.0610  0.35
## y22      0.74      0.74    0.68      0.49 2.9    0.031 0.0198  0.44
## y23      0.62      0.62    0.57      0.36 1.7    0.044 0.0316  0.39
## y24      0.69      0.70    0.61      0.43 2.3    0.036 0.0067  0.44
## 
##  Item statistics 
##       n raw.r std.r r.cor r.drop mean   sd
## y21 215  0.78  0.78  0.66   0.59  3.4 0.75
## y22 215  0.71  0.68  0.52   0.43  3.3 0.85
## y23 215  0.80  0.81  0.75   0.62  3.7 0.75
## y24 215  0.70  0.73  0.65   0.50  4.0 0.67
invalid <- NULL
for (i in (1:ncol(dat_y2))) {
  if (ay2$alpha.drop[i,1] > ay2$total$raw_alpha) {
    invalid <- c(invalid, rownames(ay2$alpha.drop[i,]))
  }
}
invalid
## [1] "y22"

Nilai Cronbach Alfa: 0.74

\(Y_{22}\) tidak valid dan dikeluarkan

dat_y2 <- data.frame(y21,y23,y24)
ay2 <- alpha(dat_y2, check.keys = T)
## Number of categories should be increased  in order to count frequencies.

Nilai Cronbach Alfa baru: 0.74

mod5 <- 'y2 =~ y21 + y23 + y24'
fit <- cfa(mod5, data = dat)
summary(fit, fit.measures = T)
## lavaan 0.6-12 ended normally after 18 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                         6
## 
##   Number of observations                           215
## 
## Model Test User Model:
##                                                       
##   Test statistic                                 0.000
##   Degrees of freedom                                 0
## 
## Model Test Baseline Model:
## 
##   Test statistic                               170.138
##   Degrees of freedom                                 3
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    1.000
##   Tucker-Lewis Index (TLI)                       1.000
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)               -618.050
##   Loglikelihood unrestricted model (H1)       -618.050
##                                                       
##   Akaike (AIC)                                1248.100
##   Bayesian (BIC)                              1268.323
##   Sample-size adjusted Bayesian (BIC)         1249.311
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.000
##   90 Percent confidence interval - lower         0.000
##   90 Percent confidence interval - upper         0.000
##   P-value RMSEA <= 0.05                             NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   y2 =~                                               
##     y21               1.000                           
##     y23               1.692    0.271    6.250    0.000
##     y24               1.329    0.200    6.653    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .y21               0.412    0.044    9.438    0.000
##    .y23               0.152    0.054    2.824    0.005
##    .y24               0.184    0.037    5.030    0.000
##     y2                0.145    0.040    3.588    0.000
standardizedSolution(fit)
lay <- get_layout("", "y2", "",
                  "y21","y23","y24", rows = 2)

graph_sem(fit)