World Values Survey 介紹
資料介紹
資料處理
結果呈現
結論
2018/6/11
World Values Survey 介紹
資料介紹
資料處理
結果呈現
結論
世界價值觀普查
縱貫性研究(longitudinal research)
一波維持五年
問卷(Likert Scale)
開放性資料庫
Online Data Analysis
Wave 6(2010~2014)
430個變項, 90350個觀察值
14種價值觀問題
#設定路徑
setwd("/Users/tayloryen/Desktop/期中project")
#載入packages
pacman::p_load(knitr,dplyr,ggplot2,tidyr)
#載入資料庫
load("/Users/tayloryen/Desktop/期中project/WV6_Data_R_v_2016_01_01.rdata")
#重新命名資料名稱 dta_wv6<-WV6_Data_R
#選擇觀察變項與觀察值
new_dta_wv6<-dta_wv6%>%select(c(V2,V4:V9,V23,V55,V242,V239,V240,V248))%>%
rename(country=V2,family=V4,friends=V5,leisure_time=V6,politics=V7,
work=V8,religion=V9,satisfaction=V23,freedom=V55,age=V242,
income=V239,sex=V240,edu=V248)%>%
select(c(country,family,friends,leisure_time,politics,work,religion,
satisfaction,freedom,age,income,sex,edu))%>%
filter(family>=0&friends>=0&leisure_time>=0&politics>=0&work>=0&
religion>=0&satisfaction>=0&freedom>=0,age>=0,income>=0,edu>=0)
#挑選觀察國家276(德國)、840(美國)
#392(日本)、410(南韓)、156(中國)、158(台灣)
new_dta_wv6$country<-as.character(new_dta_wv6$country)
new_dta_wv6<-filter(new_dta_wv6,
country%in%c("276","840","392","410","156","158"))
new_dta_wv6$country<-factor(new_dta_wv6$country,
levels=c("276","840","392","410","156","158"),
labels = c("Germany", "United States",
"Japan","South Korea","China","Taiwan"))
new_dta_wv6$sex<-as.factor(new_dta_wv6$sex)
new_dta_wv6$age<-cut(new_dta_wv6$age,
breaks=c(10,20,30,40,50,60,70,80,90,Inf),
labels=paste("Age", 1:9, sep=""))
#將資料分成東西方國家
w_new_dta_wv6<-subset(new_dta_wv6,country=="Germany"
|country=="United States")
e_new_dta_wv6<-subset(new_dta_wv6,country=="Japan"
|country=="South Korea"|country=="China"|country=="Taiwan")
#載入HH Package來處理Likert Scale library(HH)
#展示資料 knitr::kable(head(new_dta_wv6[,c(1,8:13)]))
| country | satisfaction | freedom | age | income | sex | edu |
|---|---|---|---|---|---|---|
| China | 7 | 9 | Age5 | 7 | 1 | 9 |
| China | 8 | 9 | Age5 | 6 | 2 | 5 |
| China | 9 | 9 | Age3 | 7 | 1 | 9 |
| China | 8 | 7 | Age4 | 7 | 2 | 7 |
| China | 7 | 8 | Age5 | 8 | 2 | 7 |
| China | 5 | 7 | Age3 | 5 | 1 | 3 |
東西方
自由程度會因為國籍、年齡而有所不同
生活滿意度會因為國籍、年齡而有所不同
男女在自由程度和生活滿意度上的差別不明顯
資料庫
Code Book
研究問題
分析工具