相關連結
摘要
本文主要探討台中市刑事犯罪的可能因素,並以 Becker 的主觀預期效用理論解 釋民眾犯案的可能原因。
本文採用 1995-2019 年台灣台中市之官方統計資料為分析數據,並以 OLS 線性 模型分析,且確認數據並無異質變異數或多元共線性的問題。
實證結果顯示:民眾持有非法器械如刀、槍枝、子彈,對於刑案的發生有正的 影響,惟影響並不顯著。而失業率與寵物登記數對刑案的發生有負的影響,且 兩者均對減少刑案發生有統計上的顯著影響。國會議員所屬政黨的比例變動對 刑案的發生有正的影響,但影響不顯著。本文進一步發現,槍枝持有數與排除 失業率的其他所有變數在模型中並無 jointly significant。
最後,本文依照分析結果提出建議,俾台中市政府或相關單位參考。
程式碼
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# read data and save as .csv
csv1 <- read.csv("criminal_analysis_revised.csv")
df <- as.data.frame(csv1, row.names = NULL)
df <- df[-16, ]
# OLS linear regression
result <- lm(log(cases)~log(kmtPercentage) + log(unemploymentRate) +
gun + knife + gunShot + petEnrollment, data = df)
summary(result)
# BP test & White test:
install.packages("lmtest")
install.packages("skedastic")
library(lmtest)
library(skedastic)
bptest(result)
white_lm(result)
# test for multicollinearity
library(car)
vif(result)
# linear hypothesis
# library(car)
linearHypothesis(result, "gun = log(unemploymentRate)")
linearHypothesis(result, "gun = petEnrollment")
linearHypothesis(result, "gun = gunShot")
linearHypothesis(result, "gun = knife")
linearHypothesis(result, "gun = log(kmtPercentage)")
# plot
par(mfrow = c(2, 3))
plot(log(df$kmtPercentage), log(df$cases), type = "p",
xlab = "國民黨在台中市議會所占比例(取對數)", ylab = "刑案發生數")
abline(lsfit(log(df$kmtPercentage), log(df$cases)), col = "red")
plot(log(df$unemploymentRate), log(df$cases), type = "p",
xlab = "失業率(取對數)", ylab = "刑案發生數")
abline(lsfit(log(df$unemploymentRate), log(df$cases)), col = "red")
plot(df$gun, log(df$cases), type = "p",
xlab = "槍枝持有", ylab = "刑案發生數")
abline(lsfit(df$gun, log(df$cases)), col = "red")
plot(df$gunShot, log(df$cases), type = "p",
xlab = "子彈持有", ylab = "刑案發生數")
abline(lsfit(df$gunShot, log(df$cases)), col = "red")
plot(df$knife, log(df$cases), type = "p",
xlab = "刀械持有", ylab = "刑案發生數")
abline(lsfit(df$knife, log(df$cases)), col = "red")
plot(df$petEnrollment, log(df$cases), type = "p",
xlab = "寵物登記數", ylab = "刑案發生數")
abline(lsfit(df$petEnrollment, log(df$cases)), col = "red")