{library(pacman)} p_load(tidyverse, readxl, writexl, bruceR,ggpubr, cowplot)

Raw Data Clean

```{資料整理流程}

#整理pss組資料 dta_1121psq <- read_excel(“/Users/anitayou/Desktop/工作/RA/2023-24 人社跨域計畫/112-1 raw data/dta_1121psq .xlsx”) names(dta_1121psq) dta_1121psq <- dta_1121psq %>% dplyr::select(學號, starts_with(c(“1.”,“2.”,“3.”,“4,”,“5.”)))contains(c(“性別”,“年齡”,“科系”,“年級”,“學院”))) dta_1121psq\(學號 <- toupper(dta_1121psq\)學號) dta_1121psq<- dta_1121psq %>% distinct(學號, .keep_all = T)

#整理pss組資料 dta_1121pss <- read_excel(“/Users/anitayou/Desktop/工作/RA/2023-24 人社跨域計畫/112-1 raw data/dta_1121pss.xlsx”) names(dta_1121pss) dta_1121pss <- dta_1121pss %>% dplyr::select(學號, starts_with(c(“1-”,“2-”,“3-”,“4-”,“5-”,“6-”,“7-”,“8-”))) dta_1121pss\(學號 <- toupper(dta_1121pss\)學號) dta_1121pss<- dta_1121pss %>% distinct(學號, .keep_all = T)
#合併資料 #清除重複資料、合併資料 list_dta1121=list(dta_1121psq,dta_1121pss) dta_psychology <- list_dta1121 %>% reduce(inner_join, by=‘學號’)

#輸出資料 write_xlsx(dta_psychology,“/Users/anitayou/Desktop/工作/RA/2023-24 人社跨域計畫/112-1 raw data/dta_psychology1121_clean.xlsx”)


## 欄位重新命名

```{欄位重新命名}

#第一部分
dta_psy1121_rn <- read_excel("/Users/anitayou/Desktop/工作/RA/2023-24 人社跨域計畫/112-1 raw data/dta_psychology1121_clean.xlsx")
names(dta_psy1121_rn)
colnames(dta_psy1121_rn)[1:19] <- c("ID","aca","life","tm","future","family","friends","love","emo","spi","phy","resource","coping","skills",
                                    "gender","age","major","grade","college")

#第二部分
colnames(dta_psy1121_rn)[20:163] <- c(paste0("SWLS_", 1:5), paste0("IPS_", 1:9), paste0("BDI_", 1:21), paste0("BPS_", 1:9), paste0("BAI_", 1:21), paste0("FFMQ_", 1:38), paste0("SCS_", 1:26), paste0("MAAS_", 1:15))


#輸出資料
write_xlsx(dta_psy1121_rn,"/Users/anitayou/Desktop/工作/RA/2023-24 人社跨域計畫/112-1 raw data/dta_psychology1121_rn.xlsx")

各量表計分

```{量表計分}

#計算十大困擾總分 dta_psy1121_rn <- read_excel(“/Users/anitayou/Desktop/工作/RA/2023-24 人社跨域計畫/112-1 raw data/dta_psychology1121_rn.xlsx”) names(dta_psy1121_rn) #改分數項目命名 dta_psy1121_rn <- dta_psy1121_rn %>% mutate(aca = case_when(aca == “0 無或極低” ~ as.double(0), aca == “1” ~ as.double(1), aca == “2” ~ as.double(2), aca == “3” ~ as.double(3), aca == “4 極高” ~ as.double(4)), life = case_when(life == “0 無或極低” ~ as.double(0), life == “1” ~ as.double(1), life == “2” ~ as.double(2), life == “3” ~ as.double(3), life == “4 極高” ~ as.double(4)), tm = case_when(tm == “0 無或極低” ~ as.double(0), tm == “1” ~ as.double(1), tm == “2” ~ as.double(2), tm == “3” ~ as.double(3), tm == “4 極高” ~ as.double(4)), future = case_when(future == “0 無或極低” ~ as.double(0), future == “1” ~ as.double(1), future == “2” ~ as.double(2), future == “3” ~ as.double(3), future == “4 極高” ~ as.double(4)), family = case_when(family == “0 無或極低” ~ as.double(0), family == “1” ~ as.double(1), family == “2” ~ as.double(2), family == “3” ~ as.double(3), family == “4 極高” ~ as.double(4)), friends = case_when(friends == “0 無或極低” ~ as.double(0), friends == “1” ~ as.double(1), friends == “2” ~ as.double(2), friends == “3” ~ as.double(3), friends == “4 極高” ~ as.double(4)), love = case_when(love == “0 無或極低” ~ as.double(0), love == “1” ~ as.double(1), love == “2” ~ as.double(2), love == “3” ~ as.double(3), love == “4 極高” ~ as.double(4)), emo = case_when(emo == “0 無或極低” ~ as.double(0), emo == “1” ~ as.double(1), emo == “2” ~ as.double(2), emo == “3” ~ as.double(3), emo == “4 極高” ~ as.double(4)), spi = case_when(spi == “0 無或極低” ~ as.double(0), spi == “1” ~ as.double(1), spi == “2” ~ as.double(2), spi == “3” ~ as.double(3), spi == “4 極高” ~ as.double(4)), phy = case_when(phy == “0 無或極低” ~ as.double(0), phy == “1” ~ as.double(1), phy == “2” ~ as.double(2), phy == “3” ~ as.double(3), phy == “4 極高” ~ as.double(4))) #分數加總 dta_psy1121_rn$tendistress <- rowSums(dta_psy1121_rn[,2:11])

#計算SCS分數 dta_psy1121_rn <- read_excel(“/Users/anitayou/Desktop/工作/RA/2023-24 人社跨域計畫/112-1 raw data/dta_psychology1121_rn.xlsx”) dta_psy1121_rn<- dta_psy1121_rn %>% dplyr::mutate( 自我仁慈 = round((SCS_1 + SCS_2 + SCS_3 + SCS_4 + SCS_5)/5, 3), 自我批評 = round((SCS_6 + SCS_7 + SCS_8 + SCS_9 + SCS_10)/5, 3), 自我批評_反向 = round(((6-SCS_6) + (6-SCS_7) + (6-SCS_8) + (6-SCS_9) + (6-SCS_10))/5, 3), 共同苦境 = round((SCS_11 + SCS_12 + SCS_13 + SCS_14)/4, 3), 孤立經驗 = round((SCS_15 + SCS_16 + SCS_17 + SCS_18)/4, 3), 孤立經驗_反向 = round(((6-SCS_15) + (6-SCS_16) + (6-SCS_17) + (6-SCS_18))/4, 3), 正念 = round((SCS_19 + SCS_20 + SCS_21 + SCS_22)/4, 3), 過度認同 = round((SCS_23 + SCS_24 + SCS_25 + SCS_26)/4, 3), 過度認同_反向 = round(((6-SCS_23) + (6-SCS_24) + (6-SCS_25) + (6-SCS_26))/4, 3), SCS_pos = round((自我仁慈 + 共同苦境 + 正念)/3, 3), SCS_neg = round((自我批評 + 孤立經驗 + 過度認同)/3, 3), SCS_ttl = round((SCS_pos + (自我批評_反向 + 孤立經驗_反向 +過度認同_反向)/3)/2, 3))

#計算swls分數 names(dta_psy1121_rn) dta_psy1121_rn$swls <- rowSums(dta_psy1121_rn[,20:24])

#計算maas分數 dta_psy1121_rn\(maas <- rowSums(dta_psy1121_rn[,149:163]) dta_psy1121_rn\)maas <- 105-dta_psy1121_rn$maas

#計算ips分數 dta_psy1121_rn$ips <- rowSums(dta_psy1121_rn[,25:33])

#計算bdi分數 dta_psy1121_rn$bdi <- rowSums(dta_psy1121_rn[,34:54])

#計算bai分數 dta_psy1121_rn$bai <- rowSums(dta_psy1121_rn[,64:84])

#計算bps分數 # 有反向題的加總 dta_psy1121_rn\(bps <- 0 # 反向題號 reverse <- c(2,3,7,9) for(i in 1:9){ # 判斷是否為反向題 if(i %in% reverse){ # 反向題得分需要反轉 score <- 6 - dta_psy1121_rn[[paste0("BPS_",i)]] } else { # 正向題直接取分數 score <- dta_psy1121_rn[[paste0("BPS_",i)]] } # 加到總分中 dta_psy1121_rn\)bps <- dta_psy1121_rn$bps + score }

#輸出資料 write_xlsx(dta_psy1121_rn,“/Users/anitayou/Desktop/工作/RA/2023-24 人社跨域計畫/112-1 raw data/dta_psychology1121_rn.xlsx”)


```{p_load(bruceR)}

統計分析

相關係數矩陣

```{相關係數矩陣}

dta_psy1121_rn %>% select(swls,ips,maas,bdi,bai,tendistress, SCS_ttl) %>% Corr(file =‘/Users/anitayou/Desktop/工作/RA/2023-24 人社跨域計畫/112-1 raw data/cor.docx’)


### 自我慈悲與正念中介拖延對生活滿意度的影響

```{跑雙中介}

#自我慈悲與正念中介拖延對生活滿意度的影響
PROCESS(dta_psy1121_rn, y="swls", x="ips", meds=c("SCS_ttl","maas"), covs = c("gender","age"),center = T, seed = 1, nsim = 1000)
Model Summary
───────────────────────────────────────────────────────────────
             (1) swls     (2) SCS_ttl  (3) maas     (4) swls   
───────────────────────────────────────────────────────────────
(Intercept)   20.662 ***    3.157 ***   59.435 ***   21.025 ***
              (0.679)      (0.065)      (1.226)      (0.635)   
gender男       -0.144        0.115       -0.986       -0.696    
              (0.838)      (0.080)      (1.514)      (0.786)   
age           -0.244        0.022        0.368       -0.311    
              (0.261)      (0.025)      (0.472)      (0.244)   
ips           -0.268 **    -0.034 ***   -0.999 ***   -0.187 *  
              (0.087)      (0.008)      (0.157)      (0.088)   
SCS_ttl                                               4.258 ***
                                                     (0.684)   
maas                                                 -0.065    
                                                     (0.036)   
───────────────────────────────────────────────────────────────
R^2            0.040        0.076        0.152        0.176    
Adj. R^2       0.029        0.065        0.141        0.158    
Num. obs.    245          245          245          245        
───────────────────────────────────────────────────────────────
Note. * p < .05, ** p < .01, *** p < .001.



Indirect Path: "ips" (X) ==> "SCS_ttl" (M) ==> "swls" (Y)
───────────────────────────────────────────────────────────────
               Effect    S.E.      z     p        [Boot 95% CI]
───────────────────────────────────────────────────────────────
Indirect (ab)  -0.146 (0.046) -3.198  .001 **  [-0.237, -0.061]
Direct (c')    -0.187 (0.093) -2.011  .044 *   [-0.366, -0.003]
───────────────────────────────────────────────────────────────
Percentile Bootstrap Confidence Interval



Indirect Path: "ips" (X) ==> "maas" (M) ==> "swls" (Y)
───────────────────────────────────────────────────────────────
               Effect    S.E.      z     p        [Boot 95% CI]
───────────────────────────────────────────────────────────────
Indirect (ab)   0.065 (0.042)  1.549  .121     [-0.003,  0.162]
Direct (c')    -0.187 (0.093) -2.011  .044 *   [-0.366, -0.003]
───────────────────────────────────────────────────────────────
Percentile Bootstrap Confidence Interval

自我慈悲與正念中介拖延對憂鬱程度的影響

```{跑雙中介}

PROCESS(dta_psy1121_rn, y=“bdi”, x=“ips”, meds=c(“SCS_ttl”,“maas”), covs = c(“gender”,“age”),center = T, seed = 1, nsim = 1000)

Model Summary

─────────────────────────────────────────────────────────────── (1) bdi (2) SCS_ttl (3) maas (4) bdi
─────────────────────────────────────────────────────────────── (Intercept) 12.686 *** 3.157 *** 59.435 *** 12.306 (0.960) (0.065) (1.226) (0.811)
gender男 -1.236 0.115 -0.986 -0.657
(1.185) (0.080) (1.514) (1.004)
age -0.295 0.022 0.368 -0.097
(0.369) (0.025) (0.472) (0.311)
ips 0.673
-0.034 *** -0.999 *** 0.292 ** (0.123) (0.008) (0.157) (0.112)
SCS_ttl -6.434 (0.874)
maas -0.161
(0.046)
─────────────────────────────────────────────────────────────── R^2 0.117 0.076 0.152 0.381
Adj. R^2 0.106 0.065 0.141 0.368
Num. obs. 245 245 245 245
─────────────────────────────────────────────────────────────── Note. * p < .05, ** p < .01, *** p < .001.

Indirect Path: “ips” (X) ==> “SCS_ttl” (M) ==> “bdi” (Y) ──────────────────────────────────────────────────────────── Effect S.E. z p [Boot 95% CI] ──────────────────────────────────────────────────────────── Indirect (ab) 0.221 (0.069) 3.195 .001 ** [0.093, 0.361] Direct (c’) 0.292 (0.127) 2.297 .022 * [0.043, 0.540] ──────────────────────────────────────────────────────────── Percentile Bootstrap Confidence Interval

Running 1000 simulations… Indirect Path: “ips” (X) ==> “maas” (M) ==> “bdi” (Y) ──────────────────────────────────────────────────────────── Effect S.E. z p [Boot 95% CI] ──────────────────────────────────────────────────────────── Indirect (ab) 0.160 (0.046) 3.481 <.001 *** [0.079, 0.260] Direct (c’) 0.292 (0.127) 2.297 .022 * [0.043, 0.540] ──────────────────────────────────────────────────────────── Percentile Bootstrap Confidence Interval


### 自我慈悲與正念中介十大困擾對生活滿意度的影響

```{跑雙中介}

#自我慈悲和正念中介十大困擾對生活滿意度的影響
PROCESS(dta_psy1121_rn, y="swls", x="tendistress", meds=c("SCS_ttl","maas"), covs = c("gender","age"),center = T, seed = 1, nsim = 1000)
Model Summary
───────────────────────────────────────────────────────────────
             (1) swls     (2) SCS_ttl  (3) maas     (4) swls   
───────────────────────────────────────────────────────────────
(Intercept)   21.393 ***    3.231 ***   60.729 ***   21.554 ***
              (0.609)      (0.059)      (1.245)      (0.594)   
gender男       -1.257        0.003       -2.954       -1.502 *  
              (0.754)      (0.073)      (1.541)      (0.738)   
age           -0.312        0.017        0.408       -0.325    
              (0.233)      (0.023)      (0.476)      (0.226)   
tendistress   -0.456 ***   -0.044 ***   -0.645 ***   -0.390 ***
              (0.053)      (0.005)      (0.109)      (0.060)   
SCS_ttl                                               2.704 ***
                                                     (0.684)   
maas                                                 -0.080 *  
                                                     (0.032)   
───────────────────────────────────────────────────────────────
R^2            0.236        0.238        0.136        0.287    
Adj. R^2       0.227        0.228        0.125        0.272    
Num. obs.    245          245          245          245        
───────────────────────────────────────────────────────────────
Note. * p < .05, ** p < .01, *** p < .001.


Indirect Path: "tendistress" (X) ==> "SCS_ttl" (M) ==> "swls" (Y)
───────────────────────────────────────────────────────────────
               Effect    S.E.      z     p        [Boot 95% CI]
───────────────────────────────────────────────────────────────
Indirect (ab)  -0.118 (0.034) -3.490 <.001 *** [-0.191, -0.058]
Direct (c')    -0.390 (0.062) -6.342 <.001 *** [-0.506, -0.270]
───────────────────────────────────────────────────────────────
Percentile Bootstrap Confidence Interval


Running 1000 simulations...
Indirect Path: "tendistress" (X) ==> "maas" (M) ==> "swls" (Y)
───────────────────────────────────────────────────────────────
               Effect    S.E.      z     p        [Boot 95% CI]
───────────────────────────────────────────────────────────────
Indirect (ab)   0.052 (0.026)  2.011  .044 *   [ 0.011,  0.110]
Direct (c')    -0.390 (0.062) -6.342 <.001 *** [-0.506, -0.270]
───────────────────────────────────────────────────────────────
Percentile Bootstrap Confidence Interval

自我慈悲與正念調節十大困擾對生活滿意度的影響

```{跑雙調節}

PROCESS(dta_psy1121_rn, y=“swls”, x=“tendistress”, mods=c(“SCS_ttl”,“maas”), covs = c(“gender”,“age”),center = T, seed = 1, nsim = 1000)

Model Summary

───────────────────────────────────────────── (1) swls (2) swls
───────────────────────────────────────────── (Intercept) 21.393 *** 21.571 (0.609) (0.610)
gender男 -1.257 -1.538

(0.754) (0.739)
age -0.312 -0.320
(0.233) (0.227)
tendistress -0.456
* -0.393 (0.053) (0.060)
SCS_ttl 2.652
(0.690)
maas -0.084 *
(0.033)
tendistress:SCS_ttl 0.085
(0.086)
tendistress:maas -0.006
(0.005)
───────────────────────────────────────────── R^2 0.236 0.293
Adj. R^2 0.227 0.272
Num. obs. 245 245
───────────────────────────────────────────── Note. * p < .05, ** p < .01, *** p < .001.

Interaction Effects on “swls” (Y) ───────────────────────────────────────────── F df1 df2 p
───────────────────────────────────────────── tendistress * SCS_ttl 0.97 1 237 .325
tendistress * maas 1.83 1 237 .177
(All Interactions) 0.98 2 237 .375
─────────────────────────────────────────────

Simple Slopes: “tendistress” (X) ==> “swls” (Y) ──────────────────────────────────────────────────────────────────────────── “maas” “SCS_ttl” Effect S.E. t p [95% CI] ──────────────────────────────────────────────────────────────────────────── 46.681 (- SD) 2.621 (- SD) -0.369 (0.076) -4.837 <.001 *** [-0.519, -0.219] 46.681 (- SD) 3.232 (Mean) -0.317 (0.080) -3.976 <.001 *** [-0.474, -0.160] 46.681 (- SD) 3.844 (+ SD) -0.265 (0.111) -2.380 .018 * [-0.485, -0.046] 58.788 (Mean) 2.621 (- SD) -0.444 (0.077) -5.750 <.001 *** [-0.597, -0.292] 58.788 (Mean) 3.232 (Mean) -0.393 (0.060) -6.526 <.001 *** [-0.511, -0.274] 58.788 (Mean) 3.844 (+ SD) -0.341 (0.082) -4.139 <.001 *** [-0.503, -0.179] 70.894 (+ SD) 2.621 (- SD) -0.520 (0.111) -4.676 <.001 *** [-0.739, -0.301] 70.894 (+ SD) 3.232 (Mean) -0.468 (0.084) -5.548 <.001 *** [-0.635, -0.302] 70.894 (+ SD) 3.844 (+ SD) -0.416 (0.086) -4.845 <.001 *** [-0.586, -0.247] ────────────────────────────────────────────────────────────────────────────


### 自我慈悲與正念中介十大困擾對憂鬱程度的影響

```{跑雙中介}

PROCESS(dta_psy1121_rn, y="bdi", x="tendistress", meds=c("SCS_ttl","maas"), covs = c("gender","age"),center = T, seed = 1, nsim = 1000)
Model Summary

───────────────────────────────────────────────────────────────
             (1) bdi      (2) SCS_ttl  (3) maas     (4) bdi    
───────────────────────────────────────────────────────────────
(Intercept)   11.318 ***    3.231 ***   60.729 ***   11.594 ***
              (0.836)      (0.059)      (1.245)      (0.759)   
gender男        0.845        0.003       -2.954        0.425    
              (1.035)      (0.073)      (1.541)      (0.942)   
age           -0.220        0.017        0.408       -0.085    
              (0.319)      (0.023)      (0.476)      (0.289)   
tendistress    0.800 ***   -0.044 ***   -0.645 ***    0.513 ***
              (0.073)      (0.005)      (0.109)      (0.076)   
SCS_ttl                                              -4.430 ***
                                                     (0.874)   
maas                                                 -0.146 ***
                                                     (0.041)   
───────────────────────────────────────────────────────────────
R^2            0.338        0.238        0.136        0.465    
Adj. R^2       0.330        0.228        0.125        0.454    
Num. obs.    245          245          245          245        
───────────────────────────────────────────────────────────────
Note. * p < .05, ** p < .01, *** p < .001.


Indirect Path: "tendistress" (X) ==> "SCS_ttl" (M) ==> "bdi" (Y)
────────────────────────────────────────────────────────────
               Effect    S.E.     z     p      [Boot 95% CI]
────────────────────────────────────────────────────────────
Indirect (ab)   0.193 (0.049) 3.913 <.001 *** [0.102, 0.295]
Direct (c')     0.513 (0.079) 6.526 <.001 *** [0.359, 0.662]
────────────────────────────────────────────────────────────
Percentile Bootstrap Confidence Interval


Indirect Path: "tendistress" (X) ==> "maas" (M) ==> "bdi" (Y)
────────────────────────────────────────────────────────────
               Effect    S.E.     z     p      [Boot 95% CI]
────────────────────────────────────────────────────────────
Indirect (ab)   0.094 (0.027) 3.441 <.001 *** [0.046, 0.154]
Direct (c')     0.513 (0.079) 6.526 <.001 *** [0.359, 0.662]
────────────────────────────────────────────────────────────
Percentile Bootstrap Confidence Interval

自我慈悲與正念調節十大困擾對憂鬱程度的影響

```{跑雙調節}

PROCESS(dta_psy1121_rn, y=“bdi”, x=“tendistress”, mods=c(“SCS_ttl”,“maas”), covs = c(“gender”,“age”),center = T, seed = 1, nsim = 1000)

Model Summary

───────────────────────────────────────────── (1) bdi (2) bdi
───────────────────────────────────────────── (Intercept) 11.318 *** 11.053 (0.836) (0.766)
gender男 0.845 0.358
(1.035) (0.927)
age -0.220 -0.026
(0.319) (0.285)
tendistress 0.800
0.489 (0.073) (0.075)
SCS_ttl -4.084
(0.866)
maas -0.152 (0.041)
tendistress:SCS_ttl -0.319
(0.108)
tendistress:maas 0.002
(0.006)
───────────────────────────────────────────── R^2 0.338 0.488
Adj. R^2 0.330 0.472
Num. obs. 245 245
───────────────────────────────────────────── Note.
p < .05, ** p < .01, *** p < .001.

Interaction Effects on “bdi” (Y) ───────────────────────────────────────────── F df1 df2 p
───────────────────────────────────────────── tendistress * SCS_ttl 8.75 1 237 .003 ** tendistress * maas 0.10 1 237 .751
(All Interactions) 5.24 2 237 .006 ** ─────────────────────────────────────────────

Simple Slopes: “tendistress” (X) ==> “bdi” (Y) ────────────────────────────────────────────────────────────────────────── “maas” “SCS_ttl” Effect S.E. t p [95% CI] ────────────────────────────────────────────────────────────────────────── 46.681 (- SD) 2.621 (- SD) 0.661 (0.096) 6.912 <.001 *** [ 0.473, 0.850] 46.681 (- SD) 3.232 (Mean) 0.466 (0.100) 4.662 <.001 *** [ 0.269, 0.663] 46.681 (- SD) 3.844 (+ SD) 0.271 (0.140) 1.941 .053 . [-0.004, 0.547] 58.788 (Mean) 2.621 (- SD) 0.684 (0.097) 7.048 <.001 *** [ 0.492, 0.875] 58.788 (Mean) 3.232 (Mean) 0.489 (0.075) 6.472 <.001 *** [ 0.340, 0.637] 58.788 (Mean) 3.844 (+ SD) 0.294 (0.103) 2.842 .005 ** [ 0.090, 0.497] 70.894 (+ SD) 2.621 (- SD) 0.706 (0.140) 5.056 <.001 *** [ 0.431, 0.981] 70.894 (+ SD) 3.232 (Mean) 0.511 (0.106) 4.823 <.001 *** [ 0.302, 0.719] 70.894 (+ SD) 3.844 (+ SD) 0.316 (0.108) 2.928 .004 ** [ 0.103, 0.528] ──────────────────────────────────────────────────────────────────────────


### 自我慈悲與正念調節拖延對生活滿意度的影響

```{雙調節}

PROCESS(dta_psy1121_rn, y="swls", x="ips", mods=c("SCS_ttl","maas"), covs = c("gender","age"),center = T, seed = 1, nsim = 1000)
 Model Summary

─────────────────────────────────────
             (1) swls     (2) swls   
─────────────────────────────────────
(Intercept)   20.662 ***   21.181 ***
              (0.679)      (0.648)   
gender男       -0.144       -0.671    
              (0.838)      (0.788)   
age           -0.244       -0.351    
              (0.261)      (0.246)   
ips           -0.268 **    -0.196 *  
              (0.087)      (0.089)   
SCS_ttl                     4.381 ***
                           (0.695)   
maas                       -0.069    
                           (0.036)   
ips:SCS_ttl                 0.019    
                           (0.133)   
ips:maas                    0.007    
                           (0.007)   
─────────────────────────────────────
R^2            0.040        0.181    
Adj. R^2       0.029        0.157    
Num. obs.    245          245        
─────────────────────────────────────
Note. * p < .05, ** p < .01, *** p < .001.

Interaction Effects on "swls" (Y)
──────────────────────────────────────────
                       F df1 df2     p    
──────────────────────────────────────────
ips * SCS_ttl       0.02   1 237  .884    
ips * maas          1.07   1 237  .302    
(All Interactions)  0.79   2 237  .455    
──────────────────────────────────────────

Simple Slopes: "ips" (X) ==> "swls" (Y)
────────────────────────────────────────────────────────────────────────────
 "maas"        "SCS_ttl"    Effect    S.E.      t     p             [95% CI]
────────────────────────────────────────────────────────────────────────────
 46.681 (- SD) 2.621 (- SD) -0.297 (0.127) -2.349  .020 *   [-0.547, -0.048]
 46.681 (- SD) 3.232 (Mean) -0.286 (0.131) -2.188  .030 *   [-0.543, -0.028]
 46.681 (- SD) 3.844 (+ SD) -0.274 (0.177) -1.548  .123     [-0.622,  0.075]
 58.788 (Mean) 2.621 (- SD) -0.208 (0.116) -1.789  .075 .   [-0.436,  0.021]
 58.788 (Mean) 3.232 (Mean) -0.196 (0.089) -2.209  .028 *   [-0.370, -0.021]
 58.788 (Mean) 3.844 (+ SD) -0.184 (0.124) -1.479  .141     [-0.429,  0.061]
 70.894 (+ SD) 2.621 (- SD) -0.118 (0.161) -0.730  .466     [-0.435,  0.200]
 70.894 (+ SD) 3.232 (Mean) -0.106 (0.117) -0.902  .368     [-0.337,  0.125]
 70.894 (+ SD) 3.844 (+ SD) -0.094 (0.121) -0.773  .440     [-0.333,  0.145]
────────────────────────────────────────────────────────────────────────────

自我慈悲與正念調節拖延對憂鬱程度的影響

```{雙調節}

PROCESS(dta_psy1121_rn, y=“bdi”, x=“ips”, mods=c(“SCS_ttl”,“maas”), covs = c(“gender”,“age”),center = T, seed = 1, nsim = 1000)

Model Summary

───────────────────────────────────── (1) bdi (2) bdi
───────────────────────────────────── (Intercept) 12.686 *** 12.118 (0.960) (0.827)
gender男 -1.236 -0.642
(1.185) (1.005)
age -0.295 -0.052
(0.369) (0.314)
ips 0.673
0.291 *
(0.123) (0.113)
SCS_ttl -6.642 (0.886)
maas -0.162
(0.046)
ips:SCS_ttl -0.199
(0.170)
ips:maas -0.002
(0.009)
───────────────────────────────────── R^2 0.117 0.386
Adj. R^2 0.106 0.368
Num. obs. 245 245
───────────────────────────────────── Note. * p < .05, ** p < .01, *** p < .001.

Interaction Effects on “bdi” (Y) ────────────────────────────────────────── F df1 df2 p
────────────────────────────────────────── ips * SCS_ttl 1.38 1 237 .241
ips * maas 0.03 1 237 .859
(All Interactions) 1.03 2 237 .359
──────────────────────────────────────────

Simple Slopes: “ips” (X) ==> “bdi” (Y) ────────────────────────────────────────────────────────────────────────── “maas” “SCS_ttl” Effect S.E. t p [95% CI] ────────────────────────────────────────────────────────────────────────── 46.681 (- SD) 2.621 (- SD) 0.432 (0.162) 2.676 .008 ** [ 0.114, 0.750] 46.681 (- SD) 3.232 (Mean) 0.310 (0.166) 1.865 .063 . [-0.018, 0.638] 46.681 (- SD) 3.844 (+ SD) 0.189 (0.226) 0.836 .404 [-0.256, 0.633] 58.788 (Mean) 2.621 (- SD) 0.412 (0.148) 2.786 .006 ** [ 0.121, 0.704] 58.788 (Mean) 3.232 (Mean) 0.291 (0.113) 2.572 .011 * [ 0.068, 0.513] 58.788 (Mean) 3.844 (+ SD) 0.169 (0.159) 1.065 .288 [-0.143, 0.481] 70.894 (+ SD) 2.621 (- SD) 0.393 (0.206) 1.909 .057 . [-0.012, 0.798] 70.894 (+ SD) 3.232 (Mean) 0.271 (0.150) 1.810 .072 . [-0.024, 0.566] 70.894 (+ SD) 3.844 (+ SD) 0.149 (0.155) 0.963 .337 [-0.156, 0.454] ──────────────────────────────────────────────────────────────────────────


### 三階交互作用

```{三階交互作用}

PROCESS(dta_psy1121_rn, y="bdi", x="ips", mods=c("maas","SCS_ttl"), covs = c("gender","age"),center = T, seed = 1, nsim = 1000,mod.type = "3-way")
Model Summary

──────────────────────────────────────────
                  (1) bdi      (2) bdi    
──────────────────────────────────────────
(Intercept)        12.686 ***   11.839 ***
                   (0.960)      (0.818)   
gender男            -1.236       -0.691    
                   (1.185)      (0.988)   
age                -0.295       -0.023    
                   (0.369)      (0.309)   
ips                 0.673 ***    0.407 ***
                   (0.123)      (0.118)   
maas                            -0.179 ***
                                (0.046)   
SCS_ttl                         -6.899 ***
                                (0.892)   
ips:maas                         0.005    
                                (0.009)   
ips:SCS_ttl                     -0.071    
                                (0.172)   
maas:SCS_ttl                     0.137 *  
                                (0.063)   
ips:maas:SCS_ttl                -0.024 *  
                                (0.011)   
──────────────────────────────────────────
R^2                 0.117        0.414    
Adj. R^2            0.106        0.392    
Num. obs.         245          245        
──────────────────────────────────────────
Note. * p < .05, ** p < .01, *** p < .001.


Interaction Effects on "bdi" (Y)
────────────────────────────────────────────
                         F df1 df2     p    
────────────────────────────────────────────
ips * maas            0.33   1 235  .565    
ips * SCS_ttl         0.17   1 235  .678    
maas * SCS_ttl        4.65   1 235  .032 *  
ips * maas * SCS_ttl  4.79   1 235  .030 *  
(All Interactions)    3.33   4 235  .011 *  
────────────────────────────────────────────

Conditional Interaction Effects on "bdi" (Y)
────────────────────────────────────────────────
 "SCS_ttl"    Interaction    F df1 df2     p    
────────────────────────────────────────────────
 2.621 (- SD)  ips * maas 2.76   1 235  .098 .  
 3.232 (Mean)  ips * maas 0.33   1 235  .565    
 3.844 (+ SD)  ips * maas 0.80   1 235  .371    
────────────────────────────────────────────────

Simple Slopes: "ips" (X) ==> "bdi" (Y)
──────────────────────────────────────────────────────────────────────────
 "SCS_ttl"    "maas"        Effect    S.E.     t     p            [95% CI]
──────────────────────────────────────────────────────────────────────────
 2.621 (- SD) 46.681 (- SD)  0.206 (0.174) 1.181  .239     [-0.138, 0.549]
 2.621 (- SD) 58.788 (Mean)  0.451 (0.150) 3.012  .003 **  [ 0.156, 0.746]
 2.621 (- SD) 70.894 (+ SD)  0.696 (0.241) 2.891  .004 **  [ 0.222, 1.170]
 3.232 (Mean) 46.681 (- SD)  0.343 (0.165) 2.075  .039 *   [ 0.017, 0.669]
 3.232 (Mean) 58.788 (Mean)  0.407 (0.118) 3.447 <.001 *** [ 0.174, 0.640]
 3.232 (Mean) 70.894 (+ SD)  0.472 (0.160) 2.951  .003 **  [ 0.157, 0.786]
 3.844 (+ SD) 46.681 (- SD)  0.480 (0.249) 1.930  .055 .   [-0.010, 0.970]
 3.844 (+ SD) 58.788 (Mean)  0.364 (0.166) 2.186  .030 *   [ 0.036, 0.691]
 3.844 (+ SD) 70.894 (+ SD)  0.247 (0.165) 1.501  .135     [-0.077, 0.572]
──────────────────────────────────────────────────────────────────────────