-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHIS_61_PovFood.sas
150 lines (135 loc) · 6.37 KB
/
CHIS_61_PovFood.sas
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
%LET _CLIENTTASKLABEL='CHIS_61_PovFood';
%LET _CLIENTPROCESSFLOWNAME='CHIS_Execution';
%LET _CLIENTPROJECTNAME='AsthmaAnalysis.egp';
%LET _SASPROGRAMFILE='';
%LET _SASPROGRAMFILEHOST='';
GOPTIONS ACCESSIBLE;
/*************************************************************************************
** Project Name : Secondary Research of Asthma Hospitalizations **
** Masters of Science in Business Analytics Capstone Project **
** March / April 2019 **
** Author : Matthew C. Vanderbilt **
** MSBA Candidate & NU Scholar, National University **
** Director of Fiscal Affairs, Department of Medicine, **
** UC San Diego School of Medicine **
** =============================================================================== **
** Date Created : 15 April 2019 **
** Program Name : CHIS_61_PovFood **
** Purpose : Analysis of Effects of Food Access on POVLL and RBMI **
** Note : Capitalized values represent SAS commands and unadjusted **
** variables; lower-case variables represent study-created **
** variables. **
** **
*************************************************************************************/
/* DISABLE SAS GRAPHICS */
ODS GRAPHICS OFF;
/* GLOBAL VARIABLES */
* Determine File Path for SAS EGP;
%LET localProjectPath = %SYSFUNC(SUBSTR(%SYSFUNC(DEQUOTE(&_CLIENTPROJECTPATH)), 1, %LENGTH(%SYSFUNC(DEQUOTE(&_CLIENTPROJECTPATH))) - %LENGTH(%SYSFUNC(DEQUOTE(&_CLIENTPROJECTNAME))) ));
/* MASTER LIBRARIES */
LIBNAME CHIS "&localProjectPath.CHIS";
/* Determine PDF Password */
* Pull PDF Password from Text;
FILENAME scrPath "&localProjectPath.PDFPassword.txt";
DATA _NULL_;
LENGTH text $265;
RETAIN text '';
INFILE scrPath FLOWOVER DLMSTR='//' END=last;
INPUT;
text = CATS(text,_INFILE_);
IF last THEN CALL SYMPUT('rawpath',text);
RUN;
%LET pdfPassword = %SYSFUNC(TRIM(%SYSFUNC(DEQUOTE(&rawpath))));
/* DEFINE GLOBAL OPTIONS */
ODS GRAPHICS OFF;
OPTIONS PDFPASSWORD=(owner="&pdfPassword");
OPTIONS PDFSECURITY=HIGH;
/* CREATE CUSTOM FORMATS */
OPTIONS fmtsearch=(CHIS);
/* PERFORM MULTINOMIAL LOGISTIC REGRESSION */
ODS PDF FILE="&localProjectPath.CHIS\%SYSFUNC(DEQUOTE(&_CLIENTTASKLABEL))_PROC-SURVEYLOGISTIC-FPLtoFood-A.pdf"
AUTHOR="Matthew C. Vanderbilt"
TITLE="Targeting Reduced Asthma Hospitalizations"
SUBJECT="MS Business Analytics Thesis"
STYLE=StatDoc;
PROC SURVEYLOGISTIC DATA=CHIS.CHIS_DATA_FINAL VARMETHOD=JACKKNIFE;
TITLE 'PROC SURVEYLOGISTIC - CHIS.CHIS_DATA_FINAL - Full Association';
WEIGHT FNWGT0;
REPWEIGHTS FNWGT1-FNWGT160 / jkcoefs = 1;
CLASS POVLL(REF='300% FPL and Above') /*POVERTY LEVEL*/
AC42_P(REF='Always') /*HOW OFTEN FIND FRESH FRUIT*/
AC44(REF='Always') /*FRUIT/VEG AFFORDABLE*/
;
MODEL POVLL = AC42_P
AC44
/ LINK=GLOGIT;
RUN;
ODS PDF CLOSE;
/* PERFORM MULTINOMIAL LOGISTIC REGRESSION */
ODS PDF FILE="&localProjectPath.CHIS\%SYSFUNC(DEQUOTE(&_CLIENTTASKLABEL))_PROC-SURVEYLOGISTIC-FPLtoFood-B.pdf"
AUTHOR="Matthew C. Vanderbilt"
TITLE="Targeting Reduced Asthma Hospitalizations"
SUBJECT="MS Business Analytics Thesis"
STYLE=StatDoc;
PROC SURVEYLOGISTIC DATA=CHIS.CHIS_DATA_FINAL VARMETHOD=JACKKNIFE;
TITLE 'PROC SURVEYLOGISTIC - CHIS.CHIS_DATA_FINAL - Full Association';
WEIGHT FNWGT0;
REPWEIGHTS FNWGT1-FNWGT160 / jkcoefs = 1;
CLASS POVLL(REF='300% FPL and Above') /*POVERTY LEVEL*/
AC42_P(REF='Always') /*HOW OFTEN FIND FRESH FRUIT*/
AC44(REF='Always') /*FRUIT/VEG AFFORDABLE*/
;
MODEL POVLL = AC42_P*
AC44
/ LINK=GLOGIT;
RUN;
ODS PDF CLOSE;
/* PERFORM MULTINOMIAL LOGISTIC REGRESSION */
ODS PDF FILE="&localProjectPath.CHIS\%SYSFUNC(DEQUOTE(&_CLIENTTASKLABEL))_PROC-SURVEYLOGISTIC-BMItoFood-A.pdf"
AUTHOR="Matthew C. Vanderbilt"
TITLE="Targeting Reduced Asthma Hospitalizations"
SUBJECT="MS Business Analytics Thesis"
STYLE=StatDoc;
PROC SURVEYLOGISTIC DATA=CHIS.CHIS_DATA_FINAL VARMETHOD=JACKKNIFE;
TITLE 'PROC SURVEYLOGISTIC - CHIS.CHIS_DATA_FINAL - Full Association';
WEIGHT FNWGT0;
REPWEIGHTS FNWGT1-FNWGT160 / jkcoefs = 1;
CLASS RBMI(REF='Normal 18.5-24.99') /*BMI DESCRIPTIVE*/
AC42_P(REF='Always') /*HOW OFTEN FIND FRESH FRUIT*/
AC44(REF='Always') /*FRUIT/VEG AFFORDABLE*/
;
MODEL RBMI = AC42_P
AC44
/ LINK=GLOGIT;
RUN;
ODS PDF CLOSE;
/* PERFORM MULTINOMIAL LOGISTIC REGRESSION */
ODS PDF FILE="&localProjectPath.CHIS\%SYSFUNC(DEQUOTE(&_CLIENTTASKLABEL))_PROC-SURVEYLOGISTIC-BMItoFood-B.pdf"
AUTHOR="Matthew C. Vanderbilt"
TITLE="Targeting Reduced Asthma Hospitalizations"
SUBJECT="MS Business Analytics Thesis"
STYLE=StatDoc;
PROC SURVEYLOGISTIC DATA=CHIS.CHIS_DATA_FINAL VARMETHOD=JACKKNIFE;
TITLE 'PROC SURVEYLOGISTIC - CHIS.CHIS_DATA_FINAL - Full Association';
WEIGHT FNWGT0;
REPWEIGHTS FNWGT1-FNWGT160 / jkcoefs = 1;
CLASS RBMI(REF='Normal 18.5-24.99') /*BMI DESCRIPTIVE*/
AC42_P(REF='Always') /*HOW OFTEN FIND FRESH FRUIT*/
AC44(REF='Always') /*FRUIT/VEG AFFORDABLE*/
;
MODEL RBMI = AC42_P*
AC44
/ LINK=GLOGIT;
RUN;
ODS PDF CLOSE;
/* DISABLE SAS GRAPHICS */
ODS GRAPHICS OFF;
QUIT;
GOPTIONS NOACCESSIBLE;
%LET _CLIENTTASKLABEL=;
%LET _CLIENTPROCESSFLOWNAME=;
%LET _CLIENTPROJECTPATH=;
%LET _CLIENTPROJECTPATHHOST=;
%LET _CLIENTPROJECTNAME=;
%LET _SASPROGRAMFILE=;
%LET _SASPROGRAMFILEHOST=;