Write text and code here.
What is (are) your main question(s)? What is your story? What does the final graphic show?
#금수저, 흙수저라는 말을 자주 쓴다. 자본주의 경제체제에서 돈이 중요한 것은 어쩔 수 없다. 우리는 한번쯤 내가 제벌 2세, 재벌 3세였다면 좋겠다는 생각을 한번씩 한 경험이 있다. 이는 부모님의 성격과 상관없이 단지 돈에 대한 열망이다.(물론 돈이 많으면 여유가 생겨서 성격이 더 좋을 지도 모른다…) 이러한 생각의 기저에는 우리는 남과 비교하며 불평등하다고 느꼈다는 것이 있을 것이다. 여기서 한가지 생각이 들었다. 과연 정말 부모님의 소득이 자식에게 유의미한 영향을 미칠까?하는 생각이 들었다. 그저 우리의 게으름에 대한 책임을 회피하기 위한 방어기제는 아닐까? 그래서 우리의 삶에 어느 분야까지 어느 정도 영향이 있는지 알아보고자 합니다. 이 분석을 통해서 소득 격차가 어떻게 다음 세대로 이어지는지 이해할 수 있고 이는 사회적 불평등의 구조와 기제를 파악하는데 중요한 자료가 됩니다. 이에 더하여 교육 격차 해소를 생각할 수 있고 복지 정책의 방향에 대해 생각해볼 수 있습니다.
한국복지패널조사는 한국보건사회연구원 서울대학교사회복지연구소에서 진행하는 패널조사입니다. 신규 표본을 추가하여 매년 비슷한 수의 표본 수를 유지하고 있습니다. 한국복지패널조사는 크게 가구용, 가구원용, 부가조사 세 가지로 구성되어 있습니다. 18차에서 진행한 부가조사는 장애인인에 관한 부가조사였으며, 3년을 주기로 ‘복지인식, 아동, 장애인’ 부가조사를 반복하여 진행합니다. 본 자료 분석에서는 복지패널조사데이터의 변수 중 11개의 변수를 사용할 예정입니다. 제가 사용할 데이터는 다음과 같습니다.(변경한 변수 이름=변수 -변수 설명)형식으로 하였습니다. id=h18_id -가구id income = h18_cin -가구소득 birth=h1801_5 -출생 gloomy=p1805_11 -우울감 self_esteem=p1805_20, -자존감 family_satisf=p1805_aq1, -가정생활 만족도 suicide=p1805_6aq4, -자살 계획 생각 life_satisf=p1805_12aq1, -삶의 만족도 inherit=np1806_43, -상속 parent_help=np1806_44 -부모님 경제적 도움 relation=h18_g2 -가구주와의 관계
##이상치 확인 및 제거
# 변수 검토하기(출생연도)
summary(welfare_h_raw$birth)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1925 1944 1955 1957 1969 2003
코드북에 의하면 출생년도 변수의 모름 혹은 무응답은 9999입니다. 변수 검토 결과 이상치가 존재하지 않으므로 이상치 제거 과정은 생략합니다. 앞으로의 데이터 분석의 용이성을 위하여 출생년도 변수를 보고서 작성일인 2024년 기준 한국식 세는나이로 바꾸겠습니다.
#age 변수 추가
welfare_h_raw <- welfare_h_raw %>%
mutate(age = 2024-birth+1)
#확인하기
welfare_h_raw %>%
select(birth, age) %>%
head(10)
## birth age
## 1 1945 80
## 2 1948 77
## 3 1942 83
## 4 1962 63
## 5 1940 85
## 6 1970 55
## 7 1940 85
## 8 1962 63
## 9 1978 47
## 10 1941 84
#변수검토하기(경상소득)
table(welfare_h_raw$income)
소득에 음수나 0이 있으면 안되기 때문에 결측치로 간주합니다. 편의성을 위해 결측치는 나중에 제거하도록 하겠습니다.
welfare_h_raw$income<- ifelse(welfare_h_raw$income<=0, NA, welfare_h_raw$income)
분석편의를 위해 그룹을 나누겠습니다.
#income_group 변수 추가
welfare_h_raw <- welfare_h_raw %>%
mutate(income_group= income <- ifelse(welfare_h_raw$income <3200, "1",
ifelse(welfare_h_raw$income <6100, "2",
ifelse(welfare_h_raw$income <8900, "3",
ifelse(welfare_h_raw$income <13000, "4","5")))))
#확인하기
welfare_h_raw %>%
select(income, income_group) %>%
head(10)
## income income_group
## 1 841 1
## 2 2190 1
## 3 2112 1
## 4 5153 2
## 5 1054 1
## 6 2348 1
## 7 1800 1
## 8 514 1
## 9 6750 3
## 10 4335 2
# 소득수준 범례 데이터프레임 생성
income_group <- c(1:5)
income_detail <- c("very rlow", "low", "medium", "high", "very high")
# 소득수준과 소득수준범례 변수의 class를 factor로 변경
income_group <- factor(income_group, levels = income_group)
income_detail <- factor(income_detail, levels = income_detail)
name <- data.frame(income_group, income_detail)
welfare_h_raw$income_group <- as.factor(welfare_h_raw$income_group)
# 소득수준범례, welfare_h_raw 합치기
welfare_h_raw <- left_join(welfare_h_raw, name, by = "income_group")
welfare_h_raw$income_group <- as.numeric(welfare_h_raw$income_group)
#변수검토하기(gloomy)
table(welfare_p_raw$gloomy)#1~4, 1. 극히 드물다(일주일에 1일 미만) 2. 가끔 있었다(일주일에 1-2일간) 3. 종종 있었다(일주일에 3-4일간) 4. 대부분 그랬다(일주일에 5일 이상)
##
## 1 2 3 4 9
## 9698 2675 573 127 605
코드북에 의하면 출생년도 변수의 모름 혹은 무응답은 9입니다. 무응답은 우선 결측치로 처리하겠습니다.
welfare_p_raw$gloomy<- ifelse(welfare_p_raw$gloomy==9, NA, welfare_p_raw$gloomy)
알기 쉽기 편하게 답변을 글글로 변환하겠습니다.
#gloomy데이터프레임 생성
gloomy <- c(1:4)
gloomy_detail <- c("very rarely", "occassionally", "frequently", "mostly")
# 우울감과 우울감 범례 변수의 class를 factor로 변경
gloomy <- factor(gloomy, levels = gloomy)
gloomy_detail <- factor(gloomy_detail, levels = gloomy_detail)
third_name <- data.frame(gloomy, gloomy_detail)
welfare_p_raw$gloomy <- as.factor(welfare_p_raw$gloomy)
# 우울감 범례, welfare_p_raw 합치기
welfare_p_raw <- left_join(welfare_p_raw, third_name, by = "gloomy")
welfare_p_raw$gloomy <- as.numeric(welfare_p_raw$gloomy)
#변수검토하기(자존감)
table(welfare_p_raw$self_esteem)#1~4 1. 대체로 그렇지 않다 2. 보통이다 3. 대체로그렇다 4. 항상그렇다
##
## 1 2 3 4
## 649 3251 7085 2088
알기 쉽기 편하게 답변을 한글로 변환하겠습니다.
#자존감데이터프레임 생성
self_esteem <- c(1:4)
self_esteem_detail <- c("very rarely", "occassionally", "frequently", "mostly")
# 자존감과 자존존감 범례 변수의 class를 factor로 변경
self_esteem <- factor(self_esteem, levels = self_esteem)
self_esteem_detail <- factor(self_esteem_detail, levels = self_esteem_detail)
fourth_name <- data.frame(self_esteem, self_esteem_detail)
welfare_p_raw$self_esteem <- as.factor(welfare_p_raw$self_esteem)
# 자존감 범례, welfare_p_raw 합치기
welfare_p_raw <- left_join(welfare_p_raw, fourth_name, by = "self_esteem")
welfare_p_raw$self_esteem <- as.numeric(welfare_p_raw$self_esteem)
#변수검토하기(가족생활에대한만족도)
table(welfare_p_raw$family_satisf)#1~7 1. 매우불만족 2. 불만족 3. 약간 불만족 4. 보통 5. 약간 만족 6. 만족 7. 매우 만족 0. 비해당
##
## 0 1 2 3 4 5 6 7 9
## 220 67 155 246 1934 1345 7767 1339 605
코드북에 의하면 0은 비해당입니다. 0과 9를 결측측치로 간주하고 나중에 제거해주도록 하겠습니다.알기 쉽기 편하게 답변을 글로 변환하겠습니다.
welfare_p_raw$family_satisf<- ifelse(welfare_p_raw$family_satisf==0, NA, welfare_p_raw$family_satisf)
welfare_p_raw$family_satisf<- ifelse(welfare_p_raw$family_satisf==9, NA, welfare_p_raw$family_satisf)
table(welfare_p_raw$family_satisf)
##
## 1 2 3 4 5 6 7
## 67 155 246 1934 1345 7767 1339
알기 쉽기 편하게 답변을 한글로 변환하겠습니다.
#family_satisf데이터프레임 생성
family_satisf <- c(1:7)
family_satisf_detail <- c("Very dissatisfied", "Dissatisfied", "Slightly dissatisfied", "Neutral","Slightly satisfied","Satisfied","Very satisfied")
# family_satisf과 family_satisf 범례 변수의 class를 factor로 변경
family_satisf <- factor(family_satisf, levels = family_satisf)
family_satisf_detail <- factor(family_satisf_detail, levels = family_satisf_detail)
fifth_name <- data.frame(family_satisf, family_satisf_detail)
welfare_p_raw$family_satisf <- as.factor(welfare_p_raw$family_satisf)
# family_satisf 범례, welfare_p_raw 합치기
welfare_p_raw <- left_join(welfare_p_raw, fifth_name, by = "family_satisf")
welfare_p_raw$family_satisf <- as.numeric(welfare_p_raw$family_satisf)
#변수검토하기(지금까지자살하려고구체적으로계획을세운여부)
table(welfare_p_raw$suicide)#1예 2아니요
##
## 1 2 9
## 3 188 28
9는 결측치로 취급하고 알기 쉽기 편하게 답변을 한글로 변환하겠습니다.
welfare_p_raw$suicide<- ifelse(welfare_p_raw$suicide==9, NA, welfare_p_raw$suicide)
#suicide데이터프레임 생성
suicide <- c(1:2)
suicide_detail <- c("yes", "no")
# suicide과 suicide 범례 변수의 class를 factor로 변경
suicide <- factor(suicide, levels = suicide)
suicide_detail <- factor(suicide_detail, levels = suicide_detail)
sixth_name <- data.frame(suicide, suicide_detail)
welfare_p_raw$suicide <- as.factor(welfare_p_raw$suicide)
# suicide 범례, welfare_p_raw 합치기
welfare_p_raw <- left_join(welfare_p_raw, sixth_name, by = "suicide")
welfare_p_raw$suicide <- as.numeric(welfare_p_raw$suicide)
#변수검토하기(삶의 만족도도)
table(welfare_p_raw$life_satisf)#점수(0.최악의 상태 ~ 10.최상의 상태)
##
## 0 1 2 3 4 5 6 7 8 9 10 99
## 15 46 148 380 627 2084 2311 2920 3021 1069 451 606
코드북에 의하면 99는 모름 혹은 무응답입니다. 99를 결측치로 처리하겠습니다.
welfare_p_raw$life_satisf<- ifelse(welfare_p_raw$life_satisf== 99, NA, welfare_p_raw$life_satisf)
#변수검토하기(최종학력)
table(welfare_p_raw$graduation)#1. 중학교 졸업 이하2. 고등학교 중퇴, 졸업 3. 전문대학 재학, 중퇴, 졸업 4. 대학교(4년제) 재학, 중퇴, 졸업5. 대학원 이상
## < table of extent 0 >
깔끔하게 하기 위해 순서대로 정리하도록 하겠습니다.
#변수검토하기(부모의상속이나증여여부)
table(welfare_p_raw$inherit)#1. 있다 2. 없다
##
## 1 2
## 428 3029
결측치는 나중에 제거해주도록 하겠습니다.
#inherit데이터프레임 생성
inherit <- c(1:2)
inherit_detail <- c("yes", "no")
# inherit과 inherit 범례 변수의 class를 factor로 변경
inherit <- factor(inherit, levels = inherit)
inherit_detail <- factor(inherit_detail, levels = inherit_detail)
eighth_name <- data.frame(inherit, inherit_detail)
welfare_p_raw$inherit <- as.factor(welfare_p_raw$inherit)
# inherit 범례, welfare_p_raw 합치기
welfare_p_raw <- left_join(welfare_p_raw, eighth_name, by = "inherit")
welfare_p_raw$inherit <- as.numeric(welfare_p_raw$inherit)
#변수검토하기(부모의경제적도움정도)
table(welfare_p_raw$parent_help)#"1. 전혀도움안됨2.별로 도움안됨3.보통4. 약간 도움이됨5. 매우 큰 도움이됨"
##
## 1 2 3 4 5
## 7 23 36 176 186
추후에 데이터 분석의 용이성을 위해 데이터 전처리를 실행합니다.
# 변수검토하기(부모의경제적도움정도)
table(welfare_p_raw$parent_help)
##
## 1 2 3 4 5
## 7 23 36 176 186
welfare_p_raw$parent_help <- ifelse(welfare_p_raw$parent_help %in% c(1,2), 1,
ifelse(welfare_p_raw$parent_help==3, 2,
ifelse(welfare_p_raw$parent_help %in% c(4,5),3,NA)))
#parent_help 데이터프레임 생성
parent_help <- c(1:3)
parent_help_detail <- c("도움이 안됨", "보통", "도움이 됨")
# parent_help와 parent_help 범례 변수의 class를 factor로 변경
parent_help <- factor(parent_help, levels = parent_help)
parent_help_detail <- factor(parent_help_detail, levels = parent_help_detail)
ninth_name <- data.frame(parent_help, parent_help_detail)
welfare_p_raw$parent_help <- as.factor(welfare_p_raw$parent_help)
# parent_help 범례, welfare_p_raw 합치기
welfare_p_raw <- left_join(welfare_p_raw, ninth_name, by = "parent_help")
welfare_p_raw$parent_help <- as.numeric(welfare_p_raw$parent_help)
##데이터 분석이나 그래프 그리기를 할 때 용이하게 하기위해 두 파일을 합쳐주겠습니다.
welfare_h_income<-welfare_h_raw %>% select(id, age, income_detail)
welfare_p_satisf<-welfare_p_raw %>% select(id, family_satisf, life_satisf)
welfare_satisf<-left_join(welfare_h_income, welfare_p_satisf, by="id")
## Warning in left_join(welfare_h_income, welfare_p_satisf, by = "id"): Detected an unexpected many-to-many relationship between `x` and `y`.
## ℹ Row 4 of `x` matches multiple rows in `y`.
## ℹ Row 28 of `y` matches multiple rows in `x`.
## ℹ If a many-to-many relationship is expected, set `relationship =
## "many-to-many"` to silence this warning.
welfare_satisf_2<-left_join(welfare_satisf, welfare_hpda_raw, by="id")
## Warning in left_join(welfare_satisf, welfare_hpda_raw, by = "id"): Detected an unexpected many-to-many relationship between `x` and `y`.
## ℹ Row 4 of `x` matches multiple rows in `y`.
## ℹ Row 4 of `y` matches multiple rows in `x`.
## ℹ If a many-to-many relationship is expected, set `relationship =
## "many-to-many"` to silence this warning.
welfare_satisf_3<-welfare_satisf_2 %>%
filter((relation >= 11 & relation <= 30 ),!is.na(relation),!is.na(income_detail),!is.na(family_satisf))
welfare_satisf_4<-welfare_satisf_2 %>%
filter((relation >= 11 & relation <= 30 ),!is.na(relation),!is.na(income_detail),!is.na(life_satisf))
welfare_psy<-welfare_p_raw %>% select(id, gloomy,gloomy_detail, suicide_detail, self_esteem_detail)
welfare_psy<-left_join(welfare_h_income, welfare_psy, by="id")
## Warning in left_join(welfare_h_income, welfare_psy, by = "id"): Detected an unexpected many-to-many relationship between `x` and `y`.
## ℹ Row 4 of `x` matches multiple rows in `y`.
## ℹ Row 28 of `y` matches multiple rows in `x`.
## ℹ If a many-to-many relationship is expected, set `relationship =
## "many-to-many"` to silence this warning.
welfare_psy_2<-left_join(welfare_psy, welfare_hpda_raw, by="id")
## Warning in left_join(welfare_psy, welfare_hpda_raw, by = "id"): Detected an unexpected many-to-many relationship between `x` and `y`.
## ℹ Row 4 of `x` matches multiple rows in `y`.
## ℹ Row 4 of `y` matches multiple rows in `x`.
## ℹ If a many-to-many relationship is expected, set `relationship =
## "many-to-many"` to silence this warning.
welfare_psy_3<-welfare_psy_2 %>%
filter((relation >= 11 & relation <= 30 ),!is.na(income_detail),!is.na(gloomy),!is.na(relation),!is.na(gloomy_detail),!is.na(suicide_detail),!is.na(self_esteem_detail))
welfare_money<-welfare_p_raw %>% select(id,inherit_detail, parent_help_detail)
welfare_money<-left_join(welfare_h_income, welfare_money, by="id")
## Warning in left_join(welfare_h_income, welfare_money, by = "id"): Detected an unexpected many-to-many relationship between `x` and `y`.
## ℹ Row 4 of `x` matches multiple rows in `y`.
## ℹ Row 28 of `y` matches multiple rows in `x`.
## ℹ If a many-to-many relationship is expected, set `relationship =
## "many-to-many"` to silence this warning.
welfare_money_2<-left_join(welfare_money, welfare_hpda_raw, by="id")
## Warning in left_join(welfare_money, welfare_hpda_raw, by = "id"): Detected an unexpected many-to-many relationship between `x` and `y`.
## ℹ Row 4 of `x` matches multiple rows in `y`.
## ℹ Row 4 of `y` matches multiple rows in `x`.
## ℹ If a many-to-many relationship is expected, set `relationship =
## "many-to-many"` to silence this warning.
welfare_money_3<-welfare_money_2 %>%
filter((relation >= 11 & relation <= 30 ),!is.na(income_detail),!is.na(inherit_detail))
welfare_money_4<-welfare_money_2 %>%
filter((relation >= 11 & relation <= 30 ),!is.na(income_detail),!is.na(parent_help_detail))
Describe and show how you analyzed the data
income_analysis <- welfare_satisf_3 %>%
select(income_detail) %>%
count(income_detail) %>%
mutate(perc = n/sum(n)*100)
income_analysis
## income_detail n perc
## 1 very rlow 5779 16.05501
## 2 low 8801 24.45062
## 3 medium 8934 24.82011
## 4 high 8208 22.80317
## 5 very high 4273 11.87109
소득 분위를 나눈 것은 소득 10분위를 바탕으로 5분위로 나눈 것입니다. 응답한 사람 중 대부분이 중간에 해당하는 것을 알 수 있다. 중간을 기준으로 거의 대칭을 이룬다고 볼 수 있다.
psy_analysis <- welfare_psy_3 %>%
select(gloomy_detail) %>%
count(gloomy_detail) %>%
mutate(perc = n/sum(n)*100)
psy_analysis
## gloomy_detail n perc
## 1 very rarely 583 87.9336350
## 2 occassionally 59 8.8989442
## 3 frequently 17 2.5641026
## 4 mostly 4 0.6033183
우울감과 관련하여 표본수는 적고 응답을 한 사람의 대부분이 우울감을 겪지 않는 다고 응답하였다. 이는 정신의학과를 기피하는 우리나라 사회 분위기를 보면 알 수 있다. 어느 정도 우울한 것은 기본이라고 생각을 하고 이를 내비치면 약해보인다고 싫어한다. 그래서인지 우울감과 관련하여 응답한 사람이 적고 응답한 사람 중 대부분은 우울감이 거의 없다고 대답하였다.
psy_analysis_2 <- welfare_psy_3 %>%
select(suicide_detail) %>%
count(suicide_detail) %>%
mutate(perc = n/sum(n)*100)
psy_analysis_2
## suicide_detail n perc
## 1 yes 9 1.357466
## 2 no 654 98.642534
자살과 관련해서도 비슷한 상황이다. 여기는 더 극단적으로 나누어진다. 98퍼센트 이상이 자살 계획을 세운 경험이 없다고 한다. 이는 우울감에서 말했던 이유와 비슷한 듯하고 그 양상이 여기서 더 뚜렷한 듯 하다.
psy_analysis_3 <- welfare_psy_3 %>%
select(self_esteem_detail) %>%
count(self_esteem_detail) %>%
mutate(perc = n/sum(n)*100)
psy_analysis_3
## self_esteem_detail n perc
## 1 very rarely 10 1.508296
## 2 occassionally 62 9.351433
## 3 frequently 345 52.036199
## 4 mostly 246 37.104072
의외였던 점은 자존감과 관련한 데이터도 표본이 많지는 않았다. 우리나라 대부분이 자신의 정신적 상태에 대해 드러내는 것을 꺼려하는 듯 하다. 그리고 보통 위의 데이터에서는 좋은 쪽이 압도적으로 많았는 데 여기서는 mostly비율이 높기는 하지만 제일 높은 것은 frequently였다. 외모지상주의와 같은 사회적요인, 교육에 대한 스트레스, 성공에 대한 압박등과 같은 요인 때문에 그런 듯 하다.
##부모님의 소득이 자녀의 삶의 만족도에 영향을 줄까?(가족생활에 대한 만족도, 삶의 만족도)
ggplot(data=welfare_satisf_3, aes(x = income_detail, y = family_satisf)) +
geom_jitter() +
labs(title = "부모님의 소득과 자녀의 가족생활 만족도의 관계",
x = "소득",
y = "가족생활 만족도") +
theme_minimal()
table(welfare_satisf_3$family_satisf)
##
## 1 2 3 4 5 6 7
## 141 270 513 4033 3498 22057 5483
dis_type <- welfare_satisf_3 %>%
select(family_satisf) %>%
filter(!is.na(family_satisf)) %>%
count(family_satisf) %>%
mutate(perc = n/sum(n)*100)
dis_type
## family_satisf n perc
## 1 1 141 0.3917211
## 2 2 270 0.7501042
## 3 3 513 1.4251979
## 4 4 4033 11.2043339
## 5 5 3498 9.7180164
## 6 6 22057 61.2779553
## 7 7 5483 15.2326712
대부분의 사람들이 가족 생활 만족에 불만을 보이지 않은 듯 하다. 위의 데이터 분석을 바탕으로 소득에서 very low와 very high, low와 high를 비교하면 소득이 높을 수록 확실히 만족도가 낮은 경우가 적다. 만족도 7점을 보면 very high가 표본이 더 적더라도 very low 보다 만족도가 7점인 사람이 더 많은 경우를 알 수 있다. 이는 low와 high에서도 마찬가지이다. 대부분이 가족생활에 만족한다고 하지만 소득이 높으면 확실히 가족생활 만족도가 낮은 경우가 적다.
ggplot(data=welfare_satisf_4, aes(x = income_detail, y = life_satisf)) +
geom_jitter() +
labs(title = "부모님의 소득과 자녀의 삶의 만족도의 관계",
x = "소득득",
y = "삶의 만족도") +
theme_minimal()
table(welfare_satisf_4$life_satisf)
##
## 0 1 2 3 4 5 6 7 8 9 10
## 27 45 317 562 1128 4192 5323 8664 10372 4050 1342
install.packages("plotly")
## 'C:/Users/82104/AppData/Local/R/win-library/4.3'의 위치에 패키지(들)을 설치합니다.
## (왜냐하면 'lib'가 지정되지 않았기 때문입니다)
## Warning: 저장소 https://cran.nexr.com/src/contrib에 대한 인덱스에 접근할 수 없습니다:
## URL 'https://cran.nexr.com/src/contrib/PACKAGES'를 열 수 없습니다
## Warning: package 'plotly' is not available for this version of R
##
## A version of this package for your version of R might be available elsewhere,
## see the ideas at
## https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
## Warning: 저장소 https://cran.nexr.com/bin/windows/contrib/4.3에 대한 인덱스에 접근할 수 없습니다:
## URL 'https://cran.nexr.com/bin/windows/contrib/4.3/PACKAGES'를 열 수 없습니다
library(plotly)
##
## 다음의 패키지를 부착합니다: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
# ggplot2로 그래프 생성
p<-ggplot(data=welfare_satisf_4, aes(x = income_detail, y = life_satisf)) +
geom_jitter() +
labs(title = '부모님의 소득과 자녀의 삶의 만족도의 관계', x = '소득', y = '삶의 만족도(0-10)') +
theme_minimal()
# plotly로 인터랙티브 그래프 변환
ggplotly(p)
가족 생활 만족도랑 비슷한 양상을 보인다. 소득이 높을 수록 만족도가 적은 경우(비율)이 적습니다. 근데 삶의 만족도에서 가족생활 만족도보다 더 심합니다. 이는 돈이 적어도 가족 생활은 너무 안 좋지만 않으면 그냥 만족한다고 생각하는 듯하다. 이는 우리나라 유교문화도 영향을 미쳤다고 생각합니다. 하지만 자신의 삶에 대해서는 남들과 끊임없이 비교하면서 돈이 적으면 더 부족하다고 생각한다. 돈이 적을 수록 불만족이 커졌고 만족하는 비율도 현저히 적었다. 이로써 부모의 소득이 만족도와 관련해서 직접적으로 비례관계에 있는 것은 아니지만 소득이 높을 수록 만족하지 못할 확률은 적어지고 만족할 확률은 높아진다. 그리고 돈이 무조건 많다고 만족도(가족생활/삶)가 높아지는 것 보다 오히려 소득이 중간이거나 중간보다 약간 높을 때 만족도가 더 높은 경향을 보였다. ## Figure 2 ##2. 부모님의 소득과 정신적 건강에 대하여(상당히 우울,지금까지자살하려고구체적으로계획을세운여부, 나는가치있는사람이다.)
# 1. 부모 소득과 자녀 우울감 비교 (히트맵)
ggplot(data = welfare_psy_3, aes(x = income_detail, y = gloomy_detail)) +
geom_bin2d() +
scale_fill_gradient(low = "blue", high = "red") +
labs(title = "부모소득과 자녀의 우울감 관계",
x = "소득",
y = "자녀의 우울감") +
theme_minimal()
위에서 데이터 분석에서 본 것 처럼 대부분 vare raely에 몰려있다. 소득이
medium일 때 occassionally가 비어있는 것과 같은 것은 표본수가 적어서 그런
듯 합니다.
# 2. 부모 소득과 자녀 자살 계획 여부 비교 (막대 그래프)
ggplot(data = welfare_psy_3, aes(x = factor(income_detail), fill = factor(suicide_detail))) +
geom_bar(position = "fill") +
labs(title = "부모 소득과 자녀의 자살 계획 시도의 관계",
x = "소득",
fill = "자살 계획 시도") +
theme_minimal()
표본이 적은 데다가 특정응답에 몰려있어서 no가 100%인 그래프도 있는 듯
합니다.
# 3. 부모 소득과 자녀 자존감 비교
w<-ggplot(data=welfare_psy_3, aes(x = income_detail, y = self_esteem_detail)) +
geom_jitter() +
geom_smooth(method = "lm", se = FALSE, color = "blue") +
labs(title = "부모님의 소득과 자녀의 자존감의 관계",
x = "소득",
y = "자존감") +
theme_minimal()
# plotly로 인터랙티브 그래프 변환
library(plotly)
ggplotly(w)
## `geom_smooth()` using formula = 'y ~ x'
표본이 적지만 관찰을 해보면 소득이 very low 할 때 대부분 자존감이 가장 높은 경우가 없었다. 비율 상으로 소득이 높아질 수록 자존감이 높은 비율이 올라 갔지만 소득이 가장 높을 때는 아니었다. 표본이 적어서 추가적인 자료가 필요할 듯 하지만 이 자료만 생각해보면 부모의 소득이 많은 경우 부모님을 보며 ’나도 잘해야지’하는 부담감을 느끼면서 이런 통계가 나올 수 있다고 해석해 볼 수 있습니다.
##3. 부모님의 소득과 경제적도움(부모의상속이나증여여부, 부모의경제적도움정도)
ggplot(data = welfare_money_3, aes(x = factor(income_detail), fill = factor(inherit_detail))) +
geom_bar(position = "fill") +
labs(title = "부모 소득과 자녀의 상속여부의 관계",
x = "소득",
fill = "상속 여부") +
theme_minimal()
소득이 very low에서 high까지는 상속 받는 비율이 늘어났지만 very
high에서는 아니었다. 앞선 많은 자료들에서와 같이 very high에서는 특이
케이스가 발생할 수 있다고 생각합니다. very high를 제외하면 대부분
부모님의 소득이 증가하면 상속 받을 확률이 올라간다고 볼 수 있습니다.
ggplot(welfare_money_4, aes(x = parent_help_detail, y = income_detail, color = parent_help_detail)) +
geom_dotplot(binaxis = "y", stackdir = "center", stackratio = 0.1) +
labs(title = "부모님 경제적 도움 정도와 소득 관계계",
x = "부모님 경제적 도움 정도",
y = "소득",
color = "부모님 경제적 도움 정도") +
theme_minimal()
## Bin width defaults to 1/30 of the range of the data. Pick better value with
## `binwidth`.
대부분이 감사한 마음을 갖고 부모님의 경제적 도움이 도움이 된다고
생각한다. 신기했던 것은 high과low에서 도움이 안된다고 느끼는 비율이
비슷하다는 점이다. 이는 풍족한 집에서 살아서 기대치가 높거나 하려는 일의
규모가 커서 그렇게 느꼈다고 볼 수 있습니다. 아니면 앞선 분석에서 대부분
소득이 높을 수록 자존감이 높았는데 부모님의 도움을 잘 느끼지 못하고
자존감이 높아 자신이 해냈다고 생각하는 경우도 있을 것 같습니다. 소득이
very high인 경우 도움이 안되거나 보통으로 느끼는 경우가 적을 뿐 very
low에서도 도움이 된다고 느끼는 비율이 많았습니다. #마무리 대부분의 경우
부모님의 소득이 높을 수록 자녀의 생활에 긍정적인 영향을 끼친 것은
맞았습니다. 하지만 그 영향이 엄청나다고는 보기 힘들 정도였습니다. 심지어
소득이 엄청 높은 경우에는 소득과 자녀의 생활 간의 비례관계가 성립하지
않는 경우도 많았습니다. 결과적으로 부모님의 소득에 신경쓰기 보다는
우리의 태도를 어떻게 할 것인가가 더 중요한 것 같습니다. 부모님의 도움을
어떻게 받아들이고, 자신이 바라보는 세상을 어떻게 바라볼 것인지 정립하는
게 더 중요합니다. 물론 돈이 많으면 좋습니다. 그러니 부모님의 소득이
많으면 좋을 겁니다. 하지만 그렇다고 ‘금수저’, ’흙수저’라고 말하면서
신세한탄을 할만한 근거는 없습니다. 이는 단지 자신의 책임회피를 위한
비겁한 변명입니다.