The-Final-Project
-
JianingShenAppendixA.sas- The SAS script for converting the DUSMCPUB file and output it into CSV file, then import it into R Studio(All codes in this file and been included into Appendix A of the paper).
-
JianingShenSource.R- The R Studio code for data analysis, including codes of subsetting the raw data, changign the ranking of the data, generating all the descriptive plots for the data, chi-sqare testing, Logistic regression model building and interpretation(codes of the subsetting step have been included in Appendix A of the paper).
-
Zip files of death, suicide csv data can be used after line 60 of JianingShenSource.R file SuicideData.zip- All suicide csv files:
Smort14.zip Smort15.zip Smort16.zip Smort17.zip Smort18.zip Smort19.zip
mort14.zip-mort19.zip- All death:
mort14.zip
mort15.zip
mort16.zip
mort17.zip
mort18.zip
mort19.zip
- All variables needed- down below is the varibles after subsetting for data analysis, attached with the new ranking of the data.
Data Subset Variables.
(1) X- The number of the death in raw data sets
(2) Education2003- The education level of every death in 2003 standerd
Old rank
1... 8th grade or less
2... 9 - 12th grade, no diploma
3... high school graduate or GED completed
4... some college credit, but no degree
5... Associate degree
6... Bachelor’s degree
7... Master’s degree
8... Doctorate or professional degree
New rank
1... 8th grade or less
2... 9th grade-high school graduate
3... College experience - Bachelor’s degree
4... MS’s degree or higher
(3) Month_of_Death- Month of the death, I sortted all the data into 4 quarters
(4) Sex
0... Femal
1... Male
(5) Age_Recode_12- the NO.12 age record
Old rank
1 ... Under 1 year (includes not stated infant ages)
2 ... 1 - 4 years
3 ... 5 - 14 years
4 ... 15 - 24 years
5 ... 25 - 34 years
6 ... 35 - 44 years
7 ... 45 - 54 years
8 ... 55 - 64 years
9 ... 65 - 74 years
10 ... 75 - 84 years
11 ... 85 years and over
New rank
1 ... 15 - 24 years
2 ... 25 - 34 years
3 ... 35 - 44 years
4 ... 45 - 54 years
5 ... 55 - 64 years
6 ... 65 - 74 years
7 ... Older than 75 years
(6) Marital_Status
S ... Never married, single
M ... Married
W ... Widowed
D ... Divorced
(7) Day_of_Week_of_Death
0 ... Weekend
1 ... Weekday
(8) Manner_of_Death
0 ... Non-suicide
1 ... Suicide
(9) Race_Recode_3
0 ... Minority
1 ... White
(10)Year