library(here)
library(sjlabelled)
recall<- read_data("C:/Users/v106K/OneDrive/桌面/Data of 民意與政治行為/1141民意與政治行為/1142探索式資料分析/recall/TEDS2025-T_PA09.sav")
save(recall, file = "cp.rda", compress = TRUE)
library(sjmisc)
library(sjPlot)Recall
Load Data
Selecting questionnaire questions
DV:
q19(recall)
IV:
Q2(prefer issue)、Q3(president Lai’ s cross-strait relations)、Q4(Lai’ s diplomatic)、Q5(Lai’ s national defense)、Q6(Lai’ s economic development)、Q7(Lai’ s Livelihood issue)、Q11(cabinet reshuffle)、Q16(economic stitution)、Q20(ind. vs. unif.)、Q21(party ID)
Q2
#2.在以下幾個我們國家面對的問題中,您覺得賴清德總統應該最優先處理哪一個?是兩岸關係?教育政策?年金改革?經濟發展?司法改革?還是轉型正義?【若受訪者回答 90. 其他,請訪員詳實記錄在開放題紀錄表】
#01.兩岸關係 02.教育政策 03.年金改革
#04.經濟發展 08.司法改革 14.轉型正義
frq(recall$q5)
recall$q5r <- rec(recall$q5,
rec="1=1[兩岸關係優先];2=2[教育政策優先];3=3[年金改革優先];4=4[經濟發展優先];8=5[司法改革優先];14=6[轉型正義優先] ;else=NA")
frq(recall$q5r)Q3
#3.請問您對賴清德在處理兩岸關係的表現滿不滿意(臺:咁唔滿意)?【訪員追問強弱度】
#01.非常滿意 02.有點滿意03.不太滿意 04.非常不滿意
#96.很 難 說 97.無 意 見 98.不 知 道 95.拒 答
frq(recall$q7)
recall$q7r <- rec(recall$q7,
rec="1,2=1[滿意賴兩岸];3,4=2[不滿意賴兩岸] ;else=NA")
frq(recall$q7r)Q4
#4.請問對他在外交方面的表現滿不滿意(臺:咁唔滿意)?【訪員追問強弱度】
#01.非常滿意 02.有點滿意03.不太滿意 04.非常不滿意
#96.很 難 說 97.無 意 見 98.不 知 道 95.拒 答
frq(recall$q8)
recall$q8r <- rec(recall$q8,
rec="1,2=1[滿意賴外交];3,4=2[不滿意賴外交] ;else=NA")
frq(recall$q8r)Q5
#5.那您對他在國防方面的表現滿不滿意(臺:咁唔滿意)?【訪員追問強弱度】
#01.非常滿意 02.有點滿意03.不太滿意 04.非常不滿意
#96.很 難 說 97.無 意 見 98.不 知 道 95.拒 答
frq(recall$q9)
recall$q9r <- rec(recall$q9,
rec="1,2=1[滿意賴國防];3,4=2[不滿意賴國防] ;else=NA")
frq(recall$q9r)Q6
#6.那您對他在促進(臺:推動)經濟發展的表現滿不滿意(臺:咁唔滿意)?【訪員追問強弱度】
#01.非常滿意 02.有點滿意03.不太滿意 04.非常不滿意
#96.很 難 說 97.無 意 見 98.不 知 道 95.拒 答
frq(recall$q10)
recall$q10r <- rec(recall$q10,
rec="1,2=1[滿意賴經濟];3,4=2[不滿意賴經濟] ;else=NA")
frq(recall$q10r)Q7
#7.那您對他在處理民生問題的表現滿不滿意(臺:咁唔滿意)?
#01.非常滿意 02.有點滿意03.不太滿意 04.非常不滿意
#96.很 難 說 97.無 意 見 98.不 知 道 95.拒 答
frq(recall$q11)
recall$q11r <- rec(recall$q11,
rec="1,2=1[滿意賴民生];3,4=2[不滿意賴民生] ;else=NA")
frq(recall$q11r)Q11
#11.今年9月1日政府更換了經濟、衛生福利、運動、數位發展、國家發展等五個部會首長,請問您對這次的內閣改組滿不滿意(臺:咁唔滿意)?【訪員追問強弱度】
#01.非常滿意 02.有點滿意03.不太滿意 04.非常不滿意
#96.很 難 說 97.無 意 見 98.不 知 道 95.拒 答
frq(recall$q15)
recall$q15r <- rec(recall$q15,
rec="1,2=1[滿意內閣改組];3,4=2[不滿意內閣改組] ;else=NA")
frq(recall$q15r)Q16
#16.請問您覺得臺灣現在的經濟狀況與半年前相比,是比較好(臺:卡好)、 比較不好(臺:卡壞),還是差不多?
#01.比 較 好 02.差 不 多 03.比較不好
#96.看 情 形 97.無 意 見 98.不 知 道 95.拒 答
frq(recall$q22)
recall$q22r <- rec(recall$q22,
rec="1=1[經濟比前半年好];2=2[經濟差不多];3=3[經濟比前半年不好] ;else=NA")
frq(recall$q22r)Q19
#19.今年 7 月 26 日及 8 月 23 日有舉行兩次區域立委的罷免投票,請問您對罷免的結果滿不滿意(臺:咁唔滿意)?【訪員追問強弱度】
#01.非常滿意 02.有點滿意03.不太滿意 04.非常不滿意
#96.很 難 說 97.無 意 見 98.不 知 道 95.拒 答
frq(recall$q25)
recall$q25r <- rec(recall$q25,
rec="1,2=1[滿意罷免結果];3,4=2[不滿意罷免結果] ;else=NA")
frq(recall$q25r)Q20
#20.關於臺灣和大陸的關係,有下面幾種不同的看法:1.儘快統一 2.儘快宣布獨立 3.維持現狀,以後走向統一 4.維持現狀,以後走向獨立 5.維持現狀,看情形再決定獨立或統一 6.永遠維持現狀。請問您比較偏向哪一種?
#01.儘快統一02.儘快宣布獨立 03.維持現狀,以後走向統一
#04.維持現狀,以後走向獨立 05.維持現狀,看情形再決定獨立或統一
#06.永遠維持現狀 90.其它______________________
#96.很 難 說 97.無 意 見 98.不 知 道 95.拒 答
frq(recall$q26)
recall$q26r <- rec(recall$q26,
rec="1=1[儘快統一];2=2[儘快獨立];3=3[維持現狀後統一];4=4[維持現狀後獨立]; 5=5[維持現狀後看情形];6=6[維持現狀];else=NA")
frq(recall$q26r)Q21
#21.在國內的政黨之中,請問您認為您比較支持哪一個政黨?(回答「選人不選黨」者,請追問「非選舉時期」整體而言較支持哪一個政黨)
#01.國民黨 02.民進黨 03.新黨 04.親民黨 05.臺聯
#20.綠黨 21.時代力量 23.社民黨 35.台灣基進 38.台灣民眾黨
#06.都支持 07.都不支持 96.看情形 97.無意見 98.不知道
#95.拒答 90.其他_____
frq(recall$q27)
recall$q27r <- rec(recall$q27,
rec="1=1[國民黨];2=2[民進黨];38=3[台灣民眾黨];7=4[不支持任何政黨] ;else=NA")
frq(recall$q27r)
save(recall, file = "cp.rda")CV:
library(dplyr)
library(sjlabelled)
# ============================================================
# Control Variables: sex, age, education
# ============================================================
# 1. sex
recall$gender <- factor(
sjlabelled::as_numeric(recall$sex),
levels = c(1, 2),
labels = c("Male", "Female")
)
# 2. age
# q31 = 民國出生年;995 = 拒答
recall$birth_year <- sjlabelled::as_numeric(recall$q31)
recall$age_num <- ifelse(
recall$birth_year == 995,
NA,
114 - recall$birth_year
)
# 排除不合理年齡
recall$age_num <- ifelse(
recall$age_num < 20 | recall$age_num > 110,
NA,
recall$age_num
)
# age_group 主要給描述統計用,迴歸建議用 age_num
recall$age_group <- cut(
recall$age_num,
breaks = c(19, 35, 50, 65, 75, Inf),
labels = c("20-35y", "36-50y", "51-65y", "66-75y", "75y up"),
right = TRUE
)
# 3. education
# q32 = 最高學歷;95 = 拒答
recall$edu_num <- sjlabelled::as_numeric(recall$q32)
recall$education <- case_when(
recall$edu_num %in% c(1, 2, 3) ~ "Junior High or Below",
recall$edu_num == 4 ~ "High School",
recall$edu_num %in% c(5, 6) ~ "College/University",
recall$edu_num == 7 ~ "Graduate School",
TRUE ~ NA_character_
)
recall$education <- factor(
recall$education,
levels = c(
"Junior High or Below",
"High School",
"College/University",
"Graduate School"
)
)
# 檢查控制變項
summary(recall$gender)
summary(recall$age_num)
summary(recall$age_group)
summary(recall$education)
colSums(is.na(recall[, c("gender", "age_num", "age_group", "education")]))
save(recall, file = "cp.rda")Multiple Correspondence Analysis, MCA
# 安裝套件
library(FactoMineR)
library(factoextra)
library(ggplot2)
library(dplyr)
library(ggrepel)
load("cp.rda")
# 篩選變數與因子型態轉換
recallforMCA <- recall %>%
select(q5r, q7r, q8r, q9r, q10r, q11r, q15r, q22r, q25r, q26r, q27r)
# 排除缺失值
recallforMCA.nona <- na.omit(recallforMCA)
recallforMCA.nona <- recallforMCA.nona %>%
mutate(across(everything(), ~factor(.)))# 1. q5r 最優先議題
levels(recallforMCA.nona$q5r) <- c("Cross-Strait Policy First", "Education Policy First", "Pension Reform First", "Economic Development First", "Judicial Reform First", "Transitional Justice First")
# 2. q7r 賴兩岸滿意度
levels(recallforMCA.nona$q7r) <- c("Satisfied:Cross-Strait", "Dissatisfied:Cross-Strait")
# 3. q8r 賴外交滿意度
levels(recallforMCA.nona$q8r) <- c("Satisfied:Foreign Policy", "Dissatisfied:Foreign Policy")
# 4. q9r 賴國防滿意度
levels(recallforMCA.nona$q9r) <- c("Satisfied:Defense Policy", "Dissatisfied:Defense Policy")
# 5. q10r 賴經濟滿意度
levels(recallforMCA.nona$q10r) <- c("Satisfied:Economy", "Dissatisfied:Economy")
# 6. q11r 賴民生滿意度
levels(recallforMCA.nona$q11r) <- c("Satisfied:Public Welfare", "Dissatisfied:Public Welfare")
# 7. q15r 內閣改組滿意度
levels(recallforMCA.nona$q15r) <- c("Satisfied:Cabinet Reshuffle", "Dissatisfied:Cabinet Reshuffle")
# 8. q22r 經濟狀況
levels(recallforMCA.nona$q22r) <- c("Economy Better", "Economy Same", "Economy Worse")
# 9. q26r 統獨立場
levels(recallforMCA.nona$q26r) <- c("Immediate Unification", "Immediate Independence", "Move Toward Unification", "Move Toward Independence", "Status Quo / Decide Later", "Status Quo Forever")
# 10. 核心依變項:大罷免結果滿意度
levels(recallforMCA.nona$q25r) <- c("Satisfied with Recall Results", "Dissatisfied with Recall Results")
# 11. q27r 政黨認同
levels(recallforMCA.nona$q27r) <- c("KMT", "DPP", "TPP", "Independent / None")res <- MCA(recallforMCA.nona, ncp = 10, graph = FALSE)
res$dimdesc <- dimdesc(res, axes = 1:5)
write.infile(res$dimdesc, file ="MCAresults.txt", append = FALSE)
write.infile(res$eig, file ="MCAresults.txt", append = TRUE)
write.infile(res$var, file ="MCAresults.txt", append = TRUE)# 1. 乾淨底圖
p_base <- fviz_mca_var(res,
repel = FALSE,
col.var = "contrib",
gradient.cols = c("#2A4B7C", "#D49A17", "#B83B1D"),
pointsize = 3,
labelsize = 0,
stroke.var = 0.8
)
# 2. 撈出幾何空間座標與貢獻度數據
var_coords <- as.data.frame(res$var$coord)
var_coords$zh_label <- rownames(var_coords)
var_coords$contrib <- res$var$contrib[,1] + res$var$contrib[,2]
# 3. 標記誰是核心研究變項 (依變項:大罷免結果滿意度)
var_coords <- var_coords %>%
mutate(is_target = ifelse(grepl("Recall Results", zh_label), TRUE, FALSE))
# 4. 使用 ggplot2 與 ggrepel 拼裝圖層
final_plot <- p_base +
geom_text_repel(data = filter(var_coords, is_target == FALSE),
aes(x = `Dim 1`, y = `Dim 2`, label = zh_label, color = contrib),
size = 4.0,
fontface = "bold",
box.padding = 0.6,
point.padding = 0.3,
max.overlaps = Inf,
show.legend = FALSE) +
geom_label_repel(data = filter(var_coords, is_target == TRUE),
aes(x = `Dim 1`, y = `Dim 2`, label = zh_label),
color = "#000000",
fill = "#FFFFFF",
size = 4.0,
fontface = "bold",
label.padding = unit(0.2, "lines"),
label.size = 0.5,
box.padding = 0.7,
point.padding = 0.4,
max.overlaps = Inf) +
#5.圖的生成
labs(
title = "Multiple Correspondence Analysis (MCA) on Recall Satisfaction",
subtitle = "Geometric Configuration of Category Profiles (Dim 1 & 2)",
x = "Dimension 1(28.7%)",
y = "Dimension 2 (5.7%)",
color = "Category\nContribution"
) +
theme_bw(base_size = 14) +
theme(
plot.title = element_text(face = "bold", size = 15, hjust = 0.5, color = "#1A1A1A"),
plot.subtitle = element_text(size = 11, hjust = 0.5, color = "#555555"),
axis.title = element_text(face = "bold", size = 11),
axis.text = element_text(color = "#333333"),
panel.grid.major = element_line(color = "#ECECEC", linewidth = 0.5),
panel.grid.minor = element_blank(),
legend.title = element_text(face = "bold", size = 11),
legend.position = "right"
)
# 6. 渲染輸出
print(final_plot)Regression Analysis
一、民眾的政黨認同影響了他們對罷免結果滿意度
# 1. Dependent Variable (Y)
# q25rg: 1 = Satisfied, 0 = Dissatisfied
recall$q25rg <- ifelse(
as.numeric(recall$q25r) == 1, 1,
ifelse(as.numeric(recall$q25r) == 2, 0, NA)
)
# 2. Independent Variable (X): Party Identification
recall$q27rg <- factor(
as.numeric(recall$q27r),
levels = c(1, 2, 3, 4),
labels = c("KMT", "DPP", "TPP", "Independent / None")
)recall$q27rg <- relevel(recall$q27rg, ref = "DPP")
# 3. 建立模型資料:只保留這個模型會用到的變項
reg_party <- recall %>%
select(q25rg, q27rg, gender, age_num, education) %>%
na.omit()
# 4. Logistic regression with CV
mod_recall_rg_v3 <- glm(
q25rg ~ q27rg + gender + age_num + education,
family = binomial,
data = reg_party
)
summary(mod_recall_rg_v3)
Call:
glm(formula = q25rg ~ q27rg + gender + age_num + education, family = binomial,
data = reg_party)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.0430681 0.5384594 -3.794 0.000148 ***
q27rgKMT 4.2273737 0.2874341 14.707 < 2e-16 ***
q27rgTPP 3.7871110 0.3180854 11.906 < 2e-16 ***
q27rgIndependent / None 2.2941733 0.2246691 10.211 < 2e-16 ***
genderFemale -0.1411863 0.1893915 -0.745 0.455986
age_num -0.0004203 0.0068640 -0.061 0.951171
educationHigh School -0.0108602 0.3219602 -0.034 0.973091
educationCollege/University 0.4335473 0.3124818 1.387 0.165310
educationGraduate School 1.1357559 0.3886357 2.922 0.003473 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 1224.74 on 903 degrees of freedom
Residual deviance: 744.66 on 895 degrees of freedom
AIC: 762.66
Number of Fisher Scoring iterations: 5
tab_model(
mod_recall_rg_v3,
show.se = TRUE,
show.aic = TRUE,
show.r2 = TRUE,
p.style = "stars",
transform = "exp",
collapse.ci = FALSE,
digits = 3,
digits.p = 3,
string.pred = "Party Identification and Controls (Baseline: DPP)",
string.est = "Odds Ratio (OR)",
string.ci = "95% Confidence Interval (CI)",
string.p = "p-value"
)| q25rg | |||
|---|---|---|---|
| Party Identification and Controls (Baseline: DPP) | Odds Ratio (OR) | std. Error | 95% Confidence Interval (CI) |
| (Intercept) | 0.130 *** | 0.070 | 0.045 – 0.370 |
| q27rg [KMT] | 68.537 *** | 19.700 | 39.858 – 123.355 |
| q27rg [TPP] | 44.129 *** | 14.037 | 24.244 – 84.724 |
| q27rg [Independent / None] |
9.916 *** | 2.228 | 6.435 – 15.543 |
| gender [Female] | 0.868 | 0.164 | 0.599 – 1.259 |
| age num | 1.000 | 0.007 | 0.986 – 1.013 |
| education [High School] | 0.989 | 0.318 | 0.525 – 1.857 |
| education [College/University] |
1.543 | 0.482 | 0.835 – 2.847 |
| education [Graduate School] |
3.114 ** | 1.210 | 1.461 – 6.718 |
| Observations | 904 | ||
| R2 Tjur | 0.473 | ||
| AIC | 762.656 | ||
| * p<0.05 ** p<0.01 *** p<0.001 | |||
plot_model(
mod_recall_rg_v3,
type = "pred",
terms = "q27rg",
title = "Predicted Probabilities of Recall Satisfaction by Party ID",
axis.title = c("Party Identification", "Pr(Satisfied with Recall Results)"),
ci.level = 0.95,
show.values = TRUE,
value.offset = 0.4
)二、民眾對政府各類施政滿意度影響了他們對罷免結果的滿意度
# Model 2: Policy Evaluations + CV
# ============================================================
# 1. Dependent Variable
recall$q25rg <- ifelse(
as.numeric(recall$q25r) == 1, 1,
ifelse(as.numeric(recall$q25r) == 2, 0, NA)
)
# 2. Independent Variables: Policy Evaluations
recall$q7rg <- factor(
as.numeric(recall$q7r),
levels = c(1, 2),
labels = c("Satisfied:Cross-Strait", "Dissatisfied:Cross-Strait")
)
recall$q8rg <- factor(
as.numeric(recall$q8r),
levels = c(1, 2),
labels = c("Satisfied:Foreign Policy", "Dissatisfied:Foreign Policy")
)
recall$q9rg <- factor(
as.numeric(recall$q9r),
levels = c(1, 2),
labels = c("Satisfied:Defense Policy", "Dissatisfied:Defense Policy")
)
recall$q10rg <- factor(
as.numeric(recall$q10r),
levels = c(1, 2),
labels = c("Satisfied:Economy", "Dissatisfied:Economy")
)
recall$q11rg <- factor(
as.numeric(recall$q11r),
levels = c(1, 2),
labels = c("Satisfied:Public Welfare", "Dissatisfied:Public Welfare")
)
# 設定參照組:Satisfied
recall$q7rg <- relevel(recall$q7rg, ref = "Satisfied:Cross-Strait")
recall$q8rg <- relevel(recall$q8rg, ref = "Satisfied:Foreign Policy")
recall$q9rg <- relevel(recall$q9rg, ref = "Satisfied:Defense Policy")
recall$q10rg <- relevel(recall$q10rg, ref = "Satisfied:Economy")
recall$q11rg <- relevel(recall$q11rg, ref = "Satisfied:Public Welfare")
# 3. 建立模型資料
reg_policy <- recall %>%
select(q25rg, q7rg, q8rg, q9rg, q10rg, q11rg,
gender, age_num, education) %>%
na.omit()
# 4. Logistic regression with CV
mod_recall_policy_rg <- glm(
q25rg ~ q7rg + q8rg + q9rg + q10rg + q11rg +
gender + age_num + education,
family = binomial,
data = reg_policy
)
summary(mod_recall_policy_rg)
Call:
glm(formula = q25rg ~ q7rg + q8rg + q9rg + q10rg + q11rg + gender +
age_num + education, family = binomial, data = reg_policy)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.809973 0.525271 -3.446 0.000569 ***
q7rgDissatisfied:Cross-Strait 1.160946 0.262653 4.420 9.87e-06 ***
q8rgDissatisfied:Foreign Policy 0.511134 0.273452 1.869 0.061596 .
q9rgDissatisfied:Defense Policy 1.280040 0.232760 5.499 3.81e-08 ***
q10rgDissatisfied:Economy 0.377256 0.292752 1.289 0.197518
q11rgDissatisfied:Public Welfare 0.416559 0.267099 1.560 0.118862
genderFemale -0.395272 0.184213 -2.146 0.031894 *
age_num 0.001345 0.006444 0.209 0.834614
educationHigh School 0.022856 0.329153 0.069 0.944640
educationCollege/University 0.219302 0.321522 0.682 0.495191
educationGraduate School 0.382850 0.382952 1.000 0.317439
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 1184.88 on 881 degrees of freedom
Residual deviance: 790.24 on 871 degrees of freedom
AIC: 812.24
Number of Fisher Scoring iterations: 4
tab_model(
mod_recall_policy_rg,
show.se = TRUE,
show.aic = TRUE,
show.r2 = TRUE,
p.style = "stars",
transform = "exp",
collapse.ci = FALSE,
digits = 3,
digits.p = 3,
string.pred = "Policy Evaluations and Controls (Baseline: Satisfied)",
string.est = "Odds Ratio (OR)",
string.ci = "95% Confidence Interval (CI)",
string.p = "p-value"
)| q25rg | |||
|---|---|---|---|
| Policy Evaluations and Controls (Baseline: Satisfied) | Odds Ratio (OR) | std. Error | 95% Confidence Interval (CI) |
| (Intercept) | 0.164 *** | 0.086 | 0.058 – 0.456 |
| q7rgDissatisfied × Cross-Strait |
3.193 *** | 0.839 | 1.906 – 5.350 |
| q8rgDissatisfied × Foreign Policy |
1.667 | 0.456 | 0.969 – 2.836 |
| q9rgDissatisfied × Defense Policy |
3.597 *** | 0.837 | 2.276 – 5.677 |
| q10rgDissatisfied × Economy |
1.458 | 0.427 | 0.817 – 2.581 |
| q11rgDissatisfied × Public Welfare |
1.517 | 0.405 | 0.892 – 2.547 |
| gender [Female] | 0.673 * | 0.124 | 0.468 – 0.965 |
| age num | 1.001 | 0.006 | 0.989 – 1.014 |
| education [High School] | 1.023 | 0.337 | 0.535 – 1.948 |
| education [College/University] |
1.245 | 0.400 | 0.661 – 2.333 |
| education [Graduate School] |
1.466 | 0.562 | 0.692 – 3.111 |
| Observations | 882 | ||
| R2 Tjur | 0.412 | ||
| AIC | 812.241 | ||
| * p<0.05 ** p<0.01 *** p<0.001 | |||
plot_model(
mod_recall_policy_rg,
type = "est",
transform = "exp",
title = "Determinants of Recall Satisfaction: Policy Performance",
vline.color = "grey",
show.values = TRUE,
value.offset = 0.4
)三、國內的各類議題的關注(優先)程度與罷免結果滿意度關聯?
# Model 3: Issue Priorities + CV
# ============================================================
# 1. Dependent Variable
recall$q25rg <- ifelse(
as.numeric(recall$q25r) == 1, 1,
ifelse(as.numeric(recall$q25r) == 2, 0, NA)
)
# 2. Independent Variable: Issue Priorities
recall$q5rg <- factor(
as.numeric(recall$q5r),
levels = c(1, 2, 3, 4, 5, 6),
labels = c(
"Cross-Strait Policy First",
"Education Policy First",
"Pension Reform First",
"Economic Development First",
"Judicial Reform First",
"Transitional Justice First"
)
)
recall$q5rg <- relevel(
recall$q5rg,
ref = "Cross-Strait Policy First"
)
# 3. 建立模型資料
reg_issue <- recall %>%
select(q25rg, q5rg, gender, age_num, education) %>%
na.omit()
# 4. Logistic regression with CV
mod_recall_issue_final <- glm(
q25rg ~ q5rg + gender + age_num + education,
family = binomial,
data = reg_issue
)
summary(mod_recall_issue_final)
Call:
glm(formula = q25rg ~ q5rg + gender + age_num + education, family = binomial,
data = reg_issue)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.374553 0.391593 0.956 0.33883
q5rgEducation Policy First -0.452507 0.267197 -1.694 0.09035 .
q5rgPension Reform First 0.040614 0.355487 0.114 0.90904
q5rgEconomic Development First 0.077383 0.174229 0.444 0.65694
q5rgJudicial Reform First -0.108628 0.216208 -0.502 0.61537
q5rgTransitional Justice First -1.161570 0.467796 -2.483 0.01303 *
genderFemale -0.227261 0.134080 -1.695 0.09008 .
age_num -0.006644 0.004684 -1.418 0.15608
educationHigh School 0.445122 0.234281 1.900 0.05744 .
educationCollege/University 0.590909 0.230532 2.563 0.01037 *
educationGraduate School 0.884232 0.277450 3.187 0.00144 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 1354.0 on 1006 degrees of freedom
Residual deviance: 1319.2 on 996 degrees of freedom
AIC: 1341.2
Number of Fisher Scoring iterations: 4
tab_model(
mod_recall_issue_final,
show.se = TRUE,
show.aic = TRUE,
show.r2 = TRUE,
p.style = "stars",
transform = "exp",
collapse.ci = FALSE,
digits = 3,
digits.p = 3,
string.pred = "Issue Priorities and Controls (Baseline: Cross-Strait Policy First)",
string.est = "Odds Ratio (OR)",
string.ci = "95% Confidence Interval (CI)",
string.p = "p-value"
)| q25rg | |||
|---|---|---|---|
| Issue Priorities and Controls (Baseline: Cross-Strait Policy First) | Odds Ratio (OR) | std. Error | 95% Confidence Interval (CI) |
| (Intercept) | 1.454 | 0.570 | 0.675 – 3.141 |
| q5rg [Education Policy First] |
0.636 | 0.170 | 0.376 – 1.074 |
| q5rg [Pension Reform First] |
1.041 | 0.370 | 0.523 – 2.124 |
| q5rg [Economic Development First] |
1.080 | 0.188 | 0.766 – 1.518 |
| q5rg [Judicial Reform First] |
0.897 | 0.194 | 0.587 – 1.371 |
| q5rg [Transitional Justice First] |
0.313 * | 0.146 | 0.120 – 0.766 |
| gender [Female] | 0.797 | 0.107 | 0.612 – 1.036 |
| age num | 0.993 | 0.005 | 0.984 – 1.003 |
| education [High School] | 1.561 | 0.366 | 0.987 – 2.476 |
| education [College/University] |
1.806 * | 0.416 | 1.150 – 2.843 |
| education [Graduate School] |
2.421 ** | 0.672 | 1.411 – 4.191 |
| Observations | 1007 | ||
| R2 Tjur | 0.035 | ||
| AIC | 1341.170 | ||
| * p<0.05 ** p<0.01 *** p<0.001 | |||