Pendahuluan

Penelitian ini bertujuan untuk menganalisis pengaruh Membership Type dan Discount Applied terhadap Customer Satisfaction dengan Average Rating sebagai variabel mediasi pada platform e-commerce menggunakan metode SEM-PLS.

Metode yang digunakan adalah Structural Equation Modeling - Partial Least Squares (SEM-PLS).

Load Library

library(seminr)
library(readxl)

Import Dataset

data <- read.csv("E-commerce Customer Behavior - Sheet1.csv")

Struktur Dataset

names(data)
##  [1] "Customer.ID"              "Gender"                  
##  [3] "Age"                      "City"                    
##  [5] "Membership.Type"          "Total.Spend"             
##  [7] "Items.Purchased"          "Average.Rating"          
##  [9] "Discount.Applied"         "Days.Since.Last.Purchase"
## [11] "Satisfaction.Level"
str(data)
## 'data.frame':    350 obs. of  11 variables:
##  $ Customer.ID             : int  101 102 103 104 105 106 107 108 109 110 ...
##  $ Gender                  : chr  "Female" "Male" "Female" "Male" ...
##  $ Age                     : int  29 34 43 30 27 37 31 35 41 28 ...
##  $ City                    : chr  "New York" "Los Angeles" "Chicago" "San Francisco" ...
##  $ Membership.Type         : chr  "Gold" "Silver" "Bronze" "Gold" ...
##  $ Total.Spend             : num  1120 780 511 1480 720 ...
##  $ Items.Purchased         : int  14 11 9 19 13 8 15 12 10 21 ...
##  $ Average.Rating          : num  4.6 4.1 3.4 4.7 4 3.1 4.5 4.2 3.6 4.8 ...
##  $ Discount.Applied        : logi  TRUE FALSE TRUE FALSE TRUE FALSE ...
##  $ Days.Since.Last.Purchase: int  25 18 42 12 55 22 28 14 40 9 ...
##  $ Satisfaction.Level      : chr  "Satisfied" "Neutral" "Unsatisfied" "Satisfied" ...
head(data)
##   Customer.ID Gender Age          City Membership.Type Total.Spend
## 1         101 Female  29      New York            Gold     1120.20
## 2         102   Male  34   Los Angeles          Silver      780.50
## 3         103 Female  43       Chicago          Bronze      510.75
## 4         104   Male  30 San Francisco            Gold     1480.30
## 5         105   Male  27         Miami          Silver      720.40
## 6         106 Female  37       Houston          Bronze      440.80
##   Items.Purchased Average.Rating Discount.Applied Days.Since.Last.Purchase
## 1              14            4.6             TRUE                       25
## 2              11            4.1            FALSE                       18
## 3               9            3.4             TRUE                       42
## 4              19            4.7            FALSE                       12
## 5              13            4.0             TRUE                       55
## 6               8            3.1            FALSE                       22
##   Satisfaction.Level
## 1          Satisfied
## 2            Neutral
## 3        Unsatisfied
## 4          Satisfied
## 5        Unsatisfied
## 6            Neutral

Variabel yang digunakan

data_sem <- data[, c(
  "Membership.Type",
  "Discount.Applied",
  "Average.Rating",
  "Satisfaction.Level"
)]

Melihat Isi Data

unique(data_sem$Membership.Type)
## [1] "Gold"   "Silver" "Bronze"
unique(data_sem$Satisfaction.Level)
## [1] "Satisfied"   "Neutral"     "Unsatisfied" ""

Preprocessing

Mengubah Membership Type Menjadi Numerik

data_sem$Membership.Type <- as.numeric(factor(data_sem$Membership.Type,levels = c("Bronze", "Silver", "Gold")))

Mengubah Satisfaction Level Menjadi Numerik

data_sem$Satisfaction.Level <- as.numeric(factor(data_sem$Satisfaction.Level,levels = c("Unsatisfied", "Neutral", "Satisfied")))

Mengubah Discount Applied Menjadi Numerik

data_sem$Discount.Applied <- ifelse(data_sem$Discount.Applied == TRUE,1,0)

Menghapus Missing Value

data_sem <- na.omit(data_sem)

Cek Struktur data

 str(data_sem)
## 'data.frame':    348 obs. of  4 variables:
##  $ Membership.Type   : num  3 2 1 3 2 1 3 2 1 3 ...
##  $ Discount.Applied  : num  1 0 1 0 1 0 1 0 1 0 ...
##  $ Average.Rating    : num  4.6 4.1 3.4 4.7 4 3.1 4.5 4.2 3.6 4.8 ...
##  $ Satisfaction.Level: num  3 2 1 3 1 2 3 2 1 3 ...
##  - attr(*, "na.action")= 'omit' Named int [1:2] 72 144
##   ..- attr(*, "names")= chr [1:2] "72" "144"

Measurement Model

measurement_model <- constructs(

  composite(
    "Membership",
    single_item("Membership.Type")
  ),

  composite(
    "Discount",
    single_item("Discount.Applied")
  ),

  composite(
    "Rating",
    single_item("Average.Rating")
  ),

  composite(
    "Satisfaction",
    single_item("Satisfaction.Level")
  )

)

Structural Model

structural_model <- relationships(

  paths(
    from = c("Membership", "Discount"),
    to = c("Rating", "Satisfaction")
  ),

  paths(
    from = "Rating",
    to = "Satisfaction"
  )

)

Estimasi SEM-PLS

pls_model <- estimate_pls(
  data = data_sem,
  measurement_model = measurement_model,
  structural_model = structural_model
)
## Generating the seminr model
## All 348 observations are valid.

Hasil SEM-PLS

summary(pls_model)
## 
## Results from  package seminr (2.5.0)
## 
## Path Coefficients:
##            Rating Satisfaction
## R^2         0.908        0.747
## AdjR^2      0.907        0.745
## Membership  0.950        1.160
## Discount   -0.073       -0.455
## Rating          .       -0.442
## 
## Reliability:
##              alpha  rhoA  rhoC   AVE
## Membership   1.000 1.000 1.000 1.000
## Discount     1.000 1.000 1.000 1.000
## Rating       1.000 1.000 1.000 1.000
## Satisfaction 1.000 1.000 1.000 1.000
## 
## Alpha, rhoA, and rhoC should exceed 0.7 while AVE should exceed 0.5

Bootstrapping

boot_model <- bootstrap_model(
  seminr_model = pls_model,
  nboot = 5000,
  cores = 1
)
## Bootstrapping model using seminr...
## SEMinR Model successfully bootstrapped

Hasil Bootstrapping

summary(boot_model)
## 
## Results from Bootstrap resamples:  5000
## 
## Bootstrapped Structural Paths:
##                              Original Est. Bootstrap Mean Bootstrap SD T Stat.
## Membership  ->  Rating               0.950          0.950        0.005 191.284
## Membership  ->  Satisfaction         1.160          1.160        0.094  12.356
## Discount  ->  Rating                -0.073         -0.073        0.017  -4.308
## Discount  ->  Satisfaction          -0.455         -0.456        0.027 -16.924
## Rating  ->  Satisfaction            -0.442         -0.442        0.084  -5.234
##                              2.5% CI 97.5% CI Bootstrap P Val
## Membership  ->  Rating         0.940    0.959           0.000
## Membership  ->  Satisfaction   0.970    1.341           0.000
## Discount  ->  Rating          -0.107   -0.040           0.000
## Discount  ->  Satisfaction    -0.508   -0.404           0.000
## Rating  ->  Satisfaction      -0.605   -0.276           0.000
## 
## Bootstrapped Weights:
##                                      Original Est. Bootstrap Mean Bootstrap SD
## Membership.Type  ->  Membership              1.000          1.000        0.000
## Discount.Applied  ->  Discount               1.000          1.000        0.000
## Average.Rating  ->  Rating                   1.000          1.000        0.000
## Satisfaction.Level  ->  Satisfaction         1.000          1.000        0.000
##                                      T Stat. 2.5% CI 97.5% CI Bootstrap P Val
## Membership.Type  ->  Membership            .   1.000    1.000           0.000
## Discount.Applied  ->  Discount             .   1.000    1.000           0.000
## Average.Rating  ->  Rating                 .   1.000    1.000           0.000
## Satisfaction.Level  ->  Satisfaction       .   1.000    1.000           0.000
## 
## Bootstrapped Loadings:
##                                      Original Est. Bootstrap Mean Bootstrap SD
## Membership.Type  ->  Membership              1.000          1.000        0.000
## Discount.Applied  ->  Discount               1.000          1.000        0.000
## Average.Rating  ->  Rating                   1.000          1.000        0.000
## Satisfaction.Level  ->  Satisfaction         1.000          1.000        0.000
##                                      T Stat. 2.5% CI 97.5% CI Bootstrap P Val
## Membership.Type  ->  Membership            .   1.000    1.000           0.000
## Discount.Applied  ->  Discount             .   1.000    1.000           0.000
## Average.Rating  ->  Rating                 .   1.000    1.000           0.000
## Satisfaction.Level  ->  Satisfaction       .   1.000    1.000           0.000
## 
## Bootstrapped HTMT:
##                              Original Est. Bootstrap Mean Bootstrap SD 2.5% CI
## Membership  ->  Discount             0.004          0.043        0.032   0.002
## Membership  ->  Rating               0.950          0.950        0.003   0.943
## Membership  ->  Satisfaction         0.742          0.741        0.022   0.697
## Discount  ->  Rating                 0.077          0.080        0.048   0.005
## Discount  ->  Satisfaction           0.425          0.426        0.045   0.335
## Rating  ->  Satisfaction             0.695          0.694        0.024   0.647
##                              97.5% CI Bootstrap P Val
## Membership  ->  Discount        0.120           0.000
## Membership  ->  Rating          0.956           0.000
## Membership  ->  Satisfaction    0.784           0.000
## Discount  ->  Rating            0.184           0.000
## Discount  ->  Satisfaction      0.513           0.000
## Rating  ->  Satisfaction        0.740           0.000
## 
## Bootstrapped Total Paths:
##                              Original Est. Bootstrap Mean Bootstrap SD 2.5% CI
## Membership  ->  Rating               0.950          0.950        0.005   0.940
## Membership  ->  Satisfaction         0.740          0.740        0.024   0.692
## Discount  ->  Rating                -0.073         -0.073        0.017  -0.107
## Discount  ->  Satisfaction          -0.422         -0.424        0.028  -0.479
## Rating  ->  Satisfaction            -0.442         -0.442        0.084  -0.605
##                              97.5% CI
## Membership  ->  Rating          0.959
## Membership  ->  Satisfaction    0.785
## Discount  ->  Rating           -0.040
## Discount  ->  Satisfaction     -0.368
## Rating  ->  Satisfaction       -0.276

Visualisasi Model

plot(pls_model)

Kesimpulan

Berdasarkan hasil analisis SEM-PLS, penelitian ini dapat digunakan untuk mengetahui pengaruh Membership Type dan Discount Applied terhadap Customer Satisfaction melalui Average Rating pada platform e-commerce.