Analisis Faktor-Faktor yang Memengaruhi Keputusan Pembelian Obat OTC di Indonesia: Peran Mediasi Digital Marketing dengan Pendekatan PLS-SEM

Program Studi S1 Sains Data
Universitas Negeri Surabaya

1 Pendahuluan

PLS-SEM atau Partial Least Squares Structural Equation Modeling adalah metode statistik yang digunakan untuk menganalisis hubungan antar beberapa variabel sekaligus dalam satu model. Metode dipilih karena tidak mengharuskan data berdistribusi normal dan bisa bekerja dengan baik meski ukuran sampel tidak terlalu besar.

Penelitian ini menggunakan metode PLS-SEM untuk melihat faktor-faktor apa saja yang memengaruhi keputusan pembelian obat OTC di Indonesia. PLS-SEM dipilih karena metode ini bisa menganalisis hubungan antar variabel sekaligus tanpa harus memenuhi asumsi distribusi normal. Data yang dipakai berasal dari Kaggle dengan total 643 responden dan terdiri dari empat variabel laten yaitu Reference Group (GE), Brand Experience (BE), Purchase Digital Marketing (PDM), dan Purchase Brand Decision (PBD), di mana PDM dijadikan sebagai variabel mediasi dalam model ini.

Dataset : https://www.kaggle.com/datasets/ikhwanyudakusuma/dataset-over-the-counter-otc-indonesia

2 Load Data dan EDA

data <- read.csv("/Users/savv/Dataset OTC Indonesia.csv")
head(data, 5)
##   No. No..Sampel         Age    Sex    Education.Level Internet.Access
## 1   1       3246 17-25 years Female Senior High School            Poor
## 2   2       4485 17-25 years Female Senior High School            Good
## 3   3       4568 46-55 years Female  Elementary School            Good
## 4   4       3119 26-35 years Female Junior High School            Good
## 5   5       2736 17-25 years Female Senior High School            Good
##             Provinsi PDM1 PDM2 PDM3 PDM4 PDM5 GE1 GE2 GE3 GE4 GE5 BE1 BE2 BE3
## 1         Jawa Timur    4    5    4    4    5   5   4   3   5   4   3   5   5
## 2        Jawa Tengah    5    5    5    5    5   5   5   5   5   5   5   5   5
## 3               Riau    5    3    5    3    5   5   5   4   5   4   4   4   5
## 4       Maluku Utara    4    4    3    5    5   4   5   3   5   4   4   4   4
## 5 Kalimantan Selatan    3    2    3    2    1   2   2   3   3   1   3   2   3
##   PBD1 PBD2 PBD3 PBD4 PBD5 PBD6 PBD7
## 1    3    4    5    4    4    3    5
## 2    5    4    5    4    5    5    4
## 3    4    5    5    4    3    4    5
## 4    3    3    4    3    4    4    3
## 5    2    5    5    2    3    2    3
str(data)
## 'data.frame':    643 obs. of  27 variables:
##  $ No.            : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ No..Sampel     : int  3246 4485 4568 3119 2736 4423 262 3956 4294 5169 ...
##  $ Age            : chr  "17-25 years" "17-25 years" "46-55 years" "26-35 years" ...
##  $ Sex            : chr  "Female" "Female" "Female" "Female" ...
##  $ Education.Level: chr  "Senior High School" "Senior High School" "Elementary School" "Junior High School" ...
##  $ Internet.Access: chr  "Poor" "Good" "Good" "Good" ...
##  $ Provinsi       : chr  "Jawa Timur" "Jawa Tengah" "Riau" "Maluku Utara" ...
##  $ PDM1           : int  4 5 5 4 3 5 1 5 5 5 ...
##  $ PDM2           : int  5 5 3 4 2 3 1 5 4 4 ...
##  $ PDM3           : int  4 5 5 3 3 4 1 4 3 5 ...
##  $ PDM4           : int  4 5 3 5 2 3 2 4 3 3 ...
##  $ PDM5           : int  5 5 5 5 1 5 1 3 5 4 ...
##  $ GE1            : int  5 5 5 4 2 4 1 3 4 5 ...
##  $ GE2            : int  4 5 5 5 2 3 2 1 4 3 ...
##  $ GE3            : int  3 5 4 3 3 2 1 2 5 5 ...
##  $ GE4            : int  5 5 5 5 3 4 3 3 4 4 ...
##  $ GE5            : int  4 5 4 4 1 2 2 1 4 4 ...
##  $ BE1            : int  3 5 4 4 3 2 3 3 3 5 ...
##  $ BE2            : int  5 5 4 4 2 5 2 3 5 4 ...
##  $ BE3            : int  5 5 5 4 3 3 3 4 4 5 ...
##  $ PBD1           : int  3 5 4 3 2 3 3 5 3 4 ...
##  $ PBD2           : int  4 4 5 3 5 5 3 4 3 4 ...
##  $ PBD3           : int  5 5 5 4 5 5 3 3 4 4 ...
##  $ PBD4           : int  4 4 4 3 2 3 2 4 5 4 ...
##  $ PBD5           : int  4 5 3 4 3 4 2 5 4 5 ...
##  $ PBD6           : int  3 5 4 4 2 3 3 4 4 5 ...
##  $ PBD7           : int  5 4 5 3 3 3 3 3 3 4 ...
# cek data unique
sapply(data, function(x) length(unique(x)))
##             No.      No..Sampel             Age             Sex Education.Level 
##             643             603               6               2               7 
## Internet.Access        Provinsi            PDM1            PDM2            PDM3 
##               2              35               5               5               5 
##            PDM4            PDM5             GE1             GE2             GE3 
##               5               5               5               5               5 
##             GE4             GE5             BE1             BE2             BE3 
##               5               5               5               5               5 
##            PBD1            PBD2            PBD3            PBD4            PBD5 
##               5               4               4               5               5 
##            PBD6            PBD7 
##               5               5
# cek data missing
sapply(data, function(x) sum(is.na(x)))
##             No.      No..Sampel             Age             Sex Education.Level 
##               0               0               0               0               0 
## Internet.Access        Provinsi            PDM1            PDM2            PDM3 
##               0               0               0               0               0 
##            PDM4            PDM5             GE1             GE2             GE3 
##               0               0               0               0               0 
##             GE4             GE5             BE1             BE2             BE3 
##               0               0               0               0               0 
##            PBD1            PBD2            PBD3            PBD4            PBD5 
##               0               0               0               0               0 
##            PBD6            PBD7 
##               0               0

2.1 Persiapan Data

data_konstruk <- data[, c("PDM1","PDM2","PDM3","PDM4","PDM5",
                        "GE1","GE2","GE3","GE4","GE5",
                        "BE1","BE2","BE3",
                        "PBD1","PBD2","PBD3","PBD4","PBD5","PBD6","PBD7")]

2.2 EDA

data_konstruk %>%
  pivot_longer(everything(), names_to = "item", values_to = "nilai") %>%
  mutate(Laten = case_when(
    grepl("^PDM", item) ~ "PDM",
    grepl("^GE",  item) ~ "GE",
    grepl("^BE",  item) ~ "BE",
    grepl("^PBD", item) ~ "PBD"
  )) %>%
  ggplot(aes(x = factor(nilai), fill = Laten)) +
  geom_bar() +
  facet_wrap(~ item, ncol = 5) +
  labs(
    title = "Distribusi Jawaban per Item Variabel Laten",
    x = "Nilai",
    y = "Frekuensi"
  ) +
  theme_minimal()

library(tidyverse)

# Matriks korelasi
cor_matrix <- cor(data_konstruk, use = "complete.obs")

# Ubah ke format long
cor_long <- as.data.frame(as.table(cor_matrix))

# Heatmap
ggplot(cor_long, aes(Var1, Var2, fill = Freq)) +
  geom_tile(color = "white") +
  geom_text(aes(label = round(Freq, 2)), size = 3) +
  scale_fill_gradient2(
    low = "red",
    mid = "white",
    high = "blue",
    midpoint = 0
  ) +
  labs(
    title = "Heatmap Korelasi",
    x = "",
    y = ""
  ) +
  theme_minimal() +
  theme(
    axis.text.x = element_text(angle = 45, hjust = 1)
  )

3 Uji Asumsi

3.1 Uji Kaiser-Meyer-Olkin (KMO)

Uji Kaiser-Meyer-Olkin (KMO) merupakan metode yang digunakan untuk mengukur kecukupan sampel berdasarkan proporsi varians di antara variabel-variabel yang mungkin disebabkan oleh faktor laten yang mendasarinya. Kriteria nilai Measure of Sampling Adequacy (MSA) lebih dari 0.5 maka data dianggap layak untuk dianalisis lebih lanjut

kmo_result <- KMO(data_konstruk)
print(kmo_result)
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = data_konstruk)
## Overall MSA =  0.88
## MSA for each item = 
## PDM1 PDM2 PDM3 PDM4 PDM5  GE1  GE2  GE3  GE4  GE5  BE1  BE2  BE3 PBD1 PBD2 PBD3 
## 0.90 0.85 0.88 0.86 0.90 0.89 0.87 0.86 0.91 0.84 0.88 0.90 0.87 0.88 0.88 0.86 
## PBD4 PBD5 PBD6 PBD7 
## 0.91 0.94 0.86 0.92

3.2 uji non multikolinearitas

Uji multikolinearitas dengan VIF (Variance Inflation Factor) digunakan untuk mengetahui apakah terjadi hubungan yang terlalu kuat antar variabel independen dalam model. Nilai VIF yang baik umumnya kurang dari 5, sehingga menunjukkan tidak terjadi multikolinearitas dan model layak digunakan.

data_konstruk$Overall <- rowMeans(data_konstruk)
model_vif <- lm(Overall ~ PDM1+PDM2+PDM3+PDM4+PDM5+
                            GE1+GE2+GE3+GE4+GE5+
                            BE1+BE2+BE3+
                            PBD1+PBD2+PBD3+PBD4+PBD5+PBD6+PBD7,
                data = data_konstruk)

vif_values <- vif(model_vif)
print(vif_values)
##     PDM1     PDM2     PDM3     PDM4     PDM5      GE1      GE2      GE3 
## 1.696356 1.835807 1.710319 1.858230 1.614708 1.564608 1.558965 1.670487 
##      GE4      GE5      BE1      BE2      BE3     PBD1     PBD2     PBD3 
## 1.628587 1.600319 1.497133 1.422511 1.371026 1.823024 1.904068 1.932083 
##     PBD4     PBD5     PBD6     PBD7 
## 1.820541 1.667004 1.926414 1.725166

4 Pembentukan Model PLS_SEM

4.1 Measurement Model (Outer Model)

measurement_model <- constructs(
  composite("PDM", multi_items("PDM", 1:5)), 
  composite("GE",  multi_items("GE",  1:5)), 
  composite("BE",  multi_items("BE",  1:3)), 
  composite("PBD", multi_items("PBD", 1:7))  
)

4.2 Structural Model (Inner Model)

structural_model <- relationships(
  paths(from = c("GE", "BE"), to = "PDM"),
  paths(from = "PDM", to = "PBD"),
  paths(from = c("GE", "BE"), to = "PBD")
)

4.3 Estimasi Model PLS

pls_model <- estimate_pls(
  data = data_konstruk,
  measurement_model = measurement_model,
  structural_model  = structural_model
)

4.4 Bootstrapping Model

boot_model <- bootstrap_model(
  seminr_model    = pls_model,
  nboot           = 1000,
  cores           = 1,
  seed            = 2024
)

5 Evaluasi Outer Model

5.1 Ringkasan Model

sum_pls  <- summary(pls_model)
sum_boot <- summary(boot_model)

5.2 Outer Loading

loadings_df <- as.data.frame(sum_pls$loadings)
print(round(loadings_df, 3))
##         GE    BE   PDM   PBD
## PDM1 0.000 0.000 0.769 0.000
## PDM2 0.000 0.000 0.744 0.000
## PDM3 0.000 0.000 0.750 0.000
## PDM4 0.000 0.000 0.774 0.000
## PDM5 0.000 0.000 0.731 0.000
## GE1  0.719 0.000 0.000 0.000
## GE2  0.700 0.000 0.000 0.000
## GE3  0.733 0.000 0.000 0.000
## GE4  0.734 0.000 0.000 0.000
## GE5  0.720 0.000 0.000 0.000
## BE1  0.000 0.771 0.000 0.000
## BE2  0.000 0.755 0.000 0.000
## BE3  0.000 0.712 0.000 0.000
## PBD1 0.000 0.000 0.000 0.702
## PBD2 0.000 0.000 0.000 0.740
## PBD3 0.000 0.000 0.000 0.732
## PBD4 0.000 0.000 0.000 0.737
## PBD5 0.000 0.000 0.000 0.726
## PBD6 0.000 0.000 0.000 0.725
## PBD7 0.000 0.000 0.000 0.723

5.3 Uji Reliabilitas dan Validitas Konvergen

reliability_df <- data.frame(
  Konstruk        = rownames(sum_pls$reliability),
  Cronbach_Alpha  = round(sum_pls$reliability[, "alpha"],  3),
  rho_A           = round(sum_pls$reliability[, "rhoA"],   3),
  Composite_Rel   = round(sum_pls$reliability[, "rhoC"],   3),
  AVE             = round(sum_pls$reliability[, "AVE"],     3)
)
print(reliability_df, row.names = FALSE)
##  Konstruk Cronbach_Alpha rho_A Composite_Rel   AVE
##        GE          0.774 0.786         0.844 0.520
##        BE          0.607 0.611         0.790 0.557
##       PDM          0.810 0.812         0.868 0.568
##       PBD          0.851 0.854         0.887 0.528

5.4 Uji Discriminant Validity (HTMT)

htmt_mat <- round(sum_pls$validity$htmt, 3)
print(htmt_mat)
##        GE    BE   PDM PBD
## GE      .     .     .   .
## BE  0.663     .     .   .
## PDM 0.535 0.462     .   .
## PBD 0.392 0.653 0.473   .

5.5 Uji Fornell-Larcker Criterion

fl_mat <- round(sum_pls$validity$fl_criteria, 3)
print(fl_mat)
##        GE    BE   PDM   PBD
## GE  0.721     .     .     .
## BE  0.469 0.746     .     .
## PDM 0.439 0.338 0.754     .
## PBD 0.341 0.478 0.399 0.726
## 
## FL Criteria table reports square root of AVE on the diagonal and construct correlations on the lower triangle.

6 Evaluasi Inner Model

6.1 Path Coefficient

print(sum_pls$paths)
##          PDM   PBD
## R^2    0.215 0.295
## AdjR^2 0.213 0.291
## GE     0.360 0.060
## BE     0.169 0.365
## PDM        . 0.250

6.2 Nilai R-Square

r2_df <- data.frame(
  Konstruk  = colnames(sum_pls$paths),
  R_squared = round(as.numeric(sum_pls$paths["R^2", ]), 3),
  R2_Adj    = round(as.numeric(sum_pls$paths["AdjR^2", ]), 3)
)
r2_df <- r2_df[r2_df$R_squared > 0, ]
print(r2_df, row.names = FALSE)
##  Konstruk R_squared R2_Adj
##       PDM     0.215  0.213
##       PBD     0.295  0.291

6.3 Hasil Bootstrapping Jalur Langsung

print(sum_boot$bootstrapped_paths)
##              Original Est. Bootstrap Mean Bootstrap SD T Stat. 2.5% CI 97.5% CI
## GE  ->  PDM          0.360          0.363        0.054   6.611   0.262    0.463
## GE  ->  PBD          0.060          0.066        0.047   1.278  -0.024    0.160
## BE  ->  PDM          0.169          0.168        0.047   3.583   0.079    0.258
## BE  ->  PBD          0.365          0.367        0.044   8.237   0.276    0.451
## PDM  ->  PBD         0.250          0.245        0.049   5.126   0.154    0.339
##              Bootstrap P Val
## GE  ->  PDM            0.000
## GE  ->  PBD            0.156
## BE  ->  PDM            0.000
## BE  ->  PBD            0.000
## PDM  ->  PBD           0.000

6.4 Pengaruh Tidak Langsung (Indirect Effect)

sum_boot$bootstrapped_total_indirect_paths
##             Original Est. Bootstrap Mean Bootstrap SD T Stat. 2.5% CI 97.5% CI
## GE  ->  PBD         0.090          0.088        0.020   4.421   0.051    0.132
## BE  ->  PBD         0.042          0.042        0.016   2.588   0.015    0.076
##             Bootstrap P Val
## GE  ->  PBD           0.000
## BE  ->  PBD           0.000

6.5 Effect Size (f-square)

sum_pls$fSquare
##        GE    BE   PDM   PBD
## GE  0.000 0.000 0.129 0.004
## BE  0.000 0.000 0.028 0.141
## PDM 0.000 0.000 0.000 0.067
## PBD 0.000 0.000 0.000 0.000

7 Analisis Mediasi

7.1 Perhitungan Efek Langsung dan Tidak Langsung

GE_PDM  <- sum_boot$bootstrapped_paths["GE  ->  PDM",  "Original Est."]
BE_PDM  <- sum_boot$bootstrapped_paths["BE  ->  PDM",  "Original Est."]
PDM_PBD <- sum_boot$bootstrapped_paths["PDM  ->  PBD", "Original Est."]
GE_PBD  <- sum_boot$bootstrapped_paths["GE  ->  PBD",  "Original Est."]
BE_PBD  <- sum_boot$bootstrapped_paths["BE  ->  PBD",  "Original Est."]


indirect_GE <- GE_PDM * PDM_PBD   
indirect_BE <- BE_PDM * PDM_PBD   
total_GE    <- GE_PBD + indirect_GE
total_BE    <- BE_PBD + indirect_BE

result <- data.frame(
  Jalur             = c("GE → PDM → PBD (indirect)",
                        "BE → PDM → PBD (indirect)",
                        "GE → PBD (total)",
                        "BE → PBD (total)"),
  Efek_Langsung     = round(c(NA,     NA,     GE_PBD, BE_PBD),      3),
  Efek_TidakLangsung = round(c(indirect_GE, indirect_BE,
                                indirect_GE, indirect_BE),           3),
  Efek_Total        = round(c(NA,     NA,     total_GE, total_BE),   3)
)

print(result, row.names = FALSE, na.print = "-")
##                      Jalur Efek_Langsung Efek_TidakLangsung Efek_Total
##  GE → PDM → PBD (indirect)            NA              0.090         NA
##  BE → PDM → PBD (indirect)            NA              0.042         NA
##           GE → PBD (total)         0.060              0.090      0.150
##           BE → PBD (total)         0.365              0.042      0.407
GE_PDM  <- 0.360
GE_PBD  <- 0.060   # efek langsung GE ke PBD
BE_PDM  <- 0.169
BE_PBD  <- 0.365   # efek langsung BE ke PBD
PDM_PBD <- 0.250

# Hitung indirect & total
indirect_GE <- GE_PDM * PDM_PBD   # 0.360 × 0.250
indirect_BE <- BE_PDM * PDM_PBD   # 0.169 × 0.250
total_GE    <- GE_PBD + indirect_GE
total_BE    <- BE_PBD + indirect_BE

# Tampilkan tabel
result <- data.frame(
  Jalur = c(
    "GE → PDM → PBD (tidak langsung)",
    "BE → PDM → PBD (tidak langsung)",
    "GE → PBD (total)",
    "BE → PBD (total)"
  ),
  Efek_Langsung      = round(c(NA,     NA,     GE_PBD, BE_PBD),      3),
  Efek_TidakLangsung = round(c(indirect_GE, indirect_BE,
                                indirect_GE, indirect_BE),            3),
  Efek_Total         = round(c(NA,     NA,     total_GE, total_BE),   3)
)

print(result, row.names = FALSE, na.print = "-")
##                            Jalur Efek_Langsung Efek_TidakLangsung Efek_Total
##  GE → PDM → PBD (tidak langsung)            NA              0.090         NA
##  BE → PDM → PBD (tidak langsung)            NA              0.042         NA
##                 GE → PBD (total)         0.060              0.090      0.150
##                 BE → PBD (total)         0.365              0.042      0.407
indirect_df <- data.frame(
  Hipotesis = c("H6: GE -> PDM -> PBD", "H7: BE -> PDM -> PBD"),
  Beta      = round(as.numeric(sum_boot$bootstrapped_total_indirect_paths[, "Original Est."]), 3),
  t_value   = round(as.numeric(sum_boot$bootstrapped_total_indirect_paths[, "T Stat."]), 3),
  p_value   = round(as.numeric(sum_boot$bootstrapped_total_indirect_paths[, "Bootstrap P Val"]), 3),
  CI_2.5    = round(as.numeric(sum_boot$bootstrapped_total_indirect_paths[, "2.5% CI"]), 3),
  CI_97.5   = round(as.numeric(sum_boot$bootstrapped_total_indirect_paths[, "97.5% CI"]), 3)
)

indirect_df$Keputusan <- ifelse(indirect_df$p_value < 0.05, "Signifikan", "Tidak Signifikan")
print(indirect_df, row.names = FALSE)
##             Hipotesis  Beta t_value p_value CI_2.5 CI_97.5  Keputusan
##  H6: GE -> PDM -> PBD 0.090   4.421       0  0.051   0.132 Signifikan
##  H7: BE -> PDM -> PBD 0.042   2.588       0  0.015   0.076 Signifikan

8 Visualisasi Model

grViz("digraph PLS_SEM {

  graph [layout = dot, rankdir = LR, bgcolor = '#F8F9FA',
         fontname = 'Helvetica', splines = curved]

  # Node settings
  node [shape = rectangle, style = filled, fontname = 'Helvetica',
        fontsize = 14, penwidth = 2, width = 2.5, height = 1]

  GE [label = 'Reference Group\n(GE)',
      fillcolor = '#1565C0', fontcolor = 'white', color = '#0D47A1']
  
  BE [label = 'Brand Experience\n(BE)',
      fillcolor = '#1565C0', fontcolor = 'white', color = '#0D47A1']
      
  PDM [label = 'Purchase Digital\nMarketing (PDM)',
       fillcolor = '#E65100', fontcolor = 'white', color = '#BF360C']

  PBD [label = 'Purchase Brand\nDecision (PBD)',
       fillcolor = '#1B5E20', fontcolor = 'white', color = '#154814']

  {rank = same; GE; BE}
  {rank = same; PDM}
  {rank = same; PBD}

  #  EDGES / JALUR

  # H1: GE → PDM (signifikan)
  GE -> PDM [label = 'H1: β=0.360***',
             color = '#E91E63', fontcolor = '#E91E63',
             penwidth = 3, fontsize = 11, fontname = 'Helvetica-Bold']

  # H2: BE → PDM (tidak signifikan)
  BE -> PDM [label = 'H2: β=0.169***',
             color = '#E91E63', fontcolor = '#E91E63',
             penwidth = 3, fontsize = 11, fontname = 'Helvetica-Bold']

  # H3: PDM → PBD (signifikan)
  PDM -> PBD [label = 'H3: β=0.250***',
              color = '#E91E63', fontcolor = '#E91E63',
              penwidth = 3, fontsize = 11, fontname = 'Helvetica-Bold']

  # H4: GE → PBD (tidak signifikan)
  GE -> PBD [label = 'H4: β=0.060 (ns)',
             color = '#9E9E9E', fontcolor = '#9E9E9E',
             penwidth = 1.5, fontsize = 11, style = dashed,
             fontname = 'Helvetica']

  # H5: BE → PBD (signifikan)
  BE -> PBD [label = 'H5: β=0.365***',
             color = '#E91E63', fontcolor = '#E91E63',
             penwidth = 3, fontsize = 11, fontname = 'Helvetica-Bold']
}
")

9 Visualisasi Full SEM Path Diagram Dengan Semplots

model_full <- '
  # MEASUREMENT MODEL (outer model)
  GE  =~ GE1  + GE2  + GE3  + GE4  + GE5
  BE  =~ BE1  + BE2  + BE3
  PDM =~ PDM1 + PDM2 + PDM3 + PDM4 + PDM5
  PBD =~ PBD1 + PBD2 + PBD3 + PBD4 + PBD5 + PBD6 + PBD7

  # STRUCTURAL MODEL (inner model / jalur antar konstruk)
  PDM ~ GE + BE
  PBD ~ PDM + GE + BE
'

# Estimasi model
fit_full <- sem(model_full, 
                data      = data, 
                estimator = "MLR")

# Cek ringkasan model
summary(fit_full, fit.measures = TRUE, standardized = TRUE)
## lavaan 0.6-21 ended normally after 43 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        46
## 
##   Number of observations                           643
## 
## Model Test User Model:
##                                               Standard      Scaled
##   Test Statistic                               650.516     620.958
##   Degrees of freedom                               164         164
##   P-value (Chi-square)                           0.000       0.000
##   Scaling correction factor                                  1.048
##     Yuan-Bentler correction (Mplus variant)                       
## 
## Model Test Baseline Model:
## 
##   Test statistic                              4484.089    4233.965
##   Degrees of freedom                               190         190
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.059
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.887       0.887
##   Tucker-Lewis Index (TLI)                       0.869       0.869
##                                                                   
##   Robust Comparative Fit Index (CFI)                         0.888
##   Robust Tucker-Lewis Index (TLI)                            0.871
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)             -14045.165  -14045.165
##   Scaling correction factor                                  1.222
##       for the MLR correction                                      
##   Loglikelihood unrestricted model (H1)     -13719.907  -13719.907
##   Scaling correction factor                                  1.086
##       for the MLR correction                                      
##                                                                   
##   Akaike (AIC)                               28182.330   28182.330
##   Bayesian (BIC)                             28387.773   28387.773
##   Sample-size adjusted Bayesian (SABIC)      28241.725   28241.725
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.068       0.066
##   90 Percent confidence interval - lower         0.062       0.060
##   90 Percent confidence interval - upper         0.073       0.071
##   P-value H_0: RMSEA <= 0.050                    0.000       0.000
##   P-value H_0: RMSEA >= 0.080                    0.000       0.000
##                                                                   
##   Robust RMSEA                                               0.067
##   90 Percent confidence interval - lower                     0.062
##   90 Percent confidence interval - upper                     0.073
##   P-value H_0: Robust RMSEA <= 0.050                         0.000
##   P-value H_0: Robust RMSEA >= 0.080                         0.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.057       0.057
## 
## Parameter Estimates:
## 
##   Standard errors                             Sandwich
##   Information bread                           Observed
##   Observed information based on                Hessian
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   GE =~                                                                 
##     GE1               1.000                               0.514    0.634
##     GE2               1.058    0.086   12.314    0.000    0.543    0.645
##     GE3               1.088    0.077   14.139    0.000    0.559    0.684
##     GE4               1.063    0.092   11.599    0.000    0.546    0.589
##     GE5               1.079    0.089   12.120    0.000    0.554    0.646
##   BE =~                                                                 
##     BE1               1.000                               0.548    0.649
##     BE2               0.866    0.106    8.186    0.000    0.475    0.538
##     BE3               0.876    0.077   11.386    0.000    0.480    0.573
##   PDM =~                                                                
##     PDM1              1.000                               0.512    0.682
##     PDM2              1.122    0.085   13.251    0.000    0.574    0.684
##     PDM3              1.127    0.086   13.050    0.000    0.577    0.683
##     PDM4              1.288    0.120   10.776    0.000    0.659    0.722
##     PDM5              1.127    0.090   12.492    0.000    0.577    0.630
##   PBD =~                                                                
##     PBD1              1.000                               0.563    0.651
##     PBD2              0.965    0.080   11.998    0.000    0.543    0.690
##     PBD3              0.916    0.075   12.157    0.000    0.516    0.685
##     PBD4              1.062    0.067   15.794    0.000    0.598    0.686
##     PBD5              0.894    0.070   12.815    0.000    0.504    0.656
##     PBD6              0.991    0.056   17.586    0.000    0.558    0.677
##     PBD7              0.954    0.075   12.766    0.000    0.537    0.653
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   PDM ~                                                                 
##     GE                0.397    0.126    3.160    0.002    0.399    0.399
##     BE                0.168    0.107    1.566    0.117    0.180    0.180
##   PBD ~                                                                 
##     PDM               0.303    0.075    4.060    0.000    0.275    0.275
##     GE               -0.194    0.091   -2.133    0.033   -0.177   -0.177
##     BE                0.656    0.124    5.279    0.000    0.639    0.639
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   GE ~~                                                                 
##     BE                0.181    0.021    8.464    0.000    0.644    0.644
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .GE1               0.392    0.024   16.566    0.000    0.392    0.598
##    .GE2               0.415    0.032   12.825    0.000    0.415    0.584
##    .GE3               0.356    0.027   13.069    0.000    0.356    0.533
##    .GE4               0.561    0.040   14.132    0.000    0.561    0.653
##    .GE5               0.428    0.029   14.992    0.000    0.428    0.582
##    .BE1               0.413    0.035   11.954    0.000    0.413    0.579
##    .BE2               0.553    0.048   11.539    0.000    0.553    0.710
##    .BE3               0.472    0.039   12.205    0.000    0.472    0.672
##    .PDM1              0.302    0.020   15.185    0.000    0.302    0.535
##    .PDM2              0.374    0.029   13.099    0.000    0.374    0.532
##    .PDM3              0.380    0.025   15.495    0.000    0.380    0.533
##    .PDM4              0.399    0.028   14.187    0.000    0.399    0.479
##    .PDM5              0.506    0.035   14.354    0.000    0.506    0.603
##    .PBD1              0.431    0.028   15.220    0.000    0.431    0.576
##    .PBD2              0.325    0.023   13.993    0.000    0.325    0.524
##    .PBD3              0.301    0.022   13.824    0.000    0.301    0.531
##    .PBD4              0.402    0.023   17.195    0.000    0.402    0.529
##    .PBD5              0.335    0.021   15.828    0.000    0.335    0.570
##    .PBD6              0.368    0.021   17.177    0.000    0.368    0.542
##    .PBD7              0.389    0.023   16.577    0.000    0.389    0.574
##     GE                0.264    0.047    5.554    0.000    1.000    1.000
##     BE                0.300    0.044    6.822    0.000    1.000    1.000
##    .PDM               0.188    0.035    5.310    0.000    0.716    0.716
##    .PBD               0.167    0.026    6.444    0.000    0.527    0.527

9.1 Visualisasi Full Model PLS_SEM

semPaths(fit_full,
         what           = "std",       
         whatLabels     = "std",       
         style          = "lisrel",    
         layout         = "tree2",     
         rotation       = 2,           
         
         # Ukuran node
         sizeMan        = 6,           
         sizeLat        = 10,          
         sizeMan2       = 3,
         
         # Label
         edge.label.cex = 0.8,
         node.label.cex = 0.7,
         label.cex      = 0.8,
         
         # Warna
         color = list(
           lat = c("#1565C0",   # GE  = biru tua
                   "#6A1B9A",   # BE  = ungu
                   "#E65100",   # PDM = oranye
                   "#1B5E20"),  # PBD = hijau tua
           man = "#E8EAF6"      # indikator = biru muda
         ),
         
         edge.color     = "#37474F",
         border.color   = "#263238",
         
         # Tampilan
         residuals      = TRUE,        
         intercepts     = FALSE,       
         nCharNodes     = 0,           
         curve          = 0.5,
         curvePivot     = TRUE,
         fade           = FALSE,
         
         mar            = c(2, 2, 4, 2),
         title          = FALSE)

# Tambah judul manual
title("FULL SEM PATH DIAGRAM\nPerilaku Pembelian Obat OTC Indonesia",
      cex.main = 1.4, font.main = 2, col.main = "#212121")

# Tambah legend
legend("bottomleft",
       legend = c("Reference Group (GE)",
                  "Brand Experience (BE)",
                  "Purchase Digital Marketing (PDM)",
                  "Purchase Brand Decision (PBD)"),
       fill   = c("#1565C0","#6A1B9A","#E65100","#1B5E20"),
       cex    = 0.8, bty = "n", text.font = 2)