forked from stat660-f18/team-2_project2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSTAT660-02_s17-team-2_project2_data_analysis_by_HW.sas
210 lines (159 loc) · 4.03 KB
/
STAT660-02_s17-team-2_project2_data_analysis_by_HW.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
*******************************************************************************;
**************** 80-character banner for column width reference ***************;
* (set window width to banner width to calibrate line length to 80 characters *;
*******************************************************************************;
*
This file uses the following analytic dataset to address several research
questions regarding the effectness of a direct marketing campaigns of a
Portuguese banking institution.
Dataset Name: bank_analytical created in external file
STAT660_s17-team-2_project2_data_preparation.sas, which is assumed to be
in the same directory as this file.
See included file for dataset properties
;
* environmental setup;
* set relative file import path to current directory (using standard SAS trick);
X "cd ""%substr(%sysget(SAS_EXECFILEPATH),1,%eval(%length(%sysget(SAS_EXECFILEPATH))-%length(%sysget(SAS_EXECFILENAME))))""";
* load external file that generates analytic dataset FRPM1516_analytic_file;
%include '.\STAT660-02_s17-team-2_project1_data_preparation.sas'
;
title1
'Research Question: Who were the clients of this bank?'
;
title2
'Rationale: This would help to identify the client of this bank, helping to understand who would be the target clients.'
;
footnote1
;
footnote2
;
*
Methodology: Used proc freq to find the frequency of custmoer demographic
data, using the result to draw a picture of the customers of the bank.
Limitations: Since there are limited demographic variables in the dataset,
it would be better to include more attributes for more accurate results.
Follow-up Steps: Add more client demographic data into the data set or combine
with other data results of bank clients analysis.
proc freq
data =bank_analysis
;
table
age
/nocum
;
run;
proc freq
data =bank_analysis
;
table
job
/nocum
;
run;
proc freq
data =bank_analysis
;
table
marital
/nocum
;
run;
proc freq
data =bank_analysis
;
table
education
/nocum
;
run;
proc freq
data =bank_analysis
;
table
housing
/nocum
;
run;
proc freq
data =bank_analysis
;
table
loan
/nocum
;
run;
proc means
data =bank_analysis
mean median maxdec=2
;
var
age,balance
;
run;
title;
footnote;
title1
'Research Question:What's the relationship between previous campaign outcome and this campaign result?'
;
title2
'Rationale: This would help find out how the previous campaign outcome affected this campaign result, meanwhile, we are able to indentify who were the customer easily affected by campaigns.'
;
footnote1
''
;
footnote2
''
;
footnote3
''
;
*
Methodology: Use PROC glm to run the logistic regression to find out the
exact relationship and whether this is significant in reality.
Limitations: There are many'unkonwn' and 'other' values in the data set.
This will effect the accurace of the result because of the poor data quality.
Follow-up Steps: Find out a propriate value instead of using 'unknown' value
;
proc logistic
data=bank_analysis
;
model y = poutcome
;
run;
proc glm
;
model y = poutcome
;
run;
title;
footnote;
title1
'Research Question: Is the comsumer price related to the campaign result?'
;
title2
'Rationale: This would help to find out whether there is a relationship among them. Moreover how did social economic affect the marketing campaign result if there is a relationship.'
;
footnote1
''
;
footnote2
''
;
footnote3
''
;
*
Methodology: Use proc glm to build a regression model to find out the relationship.
Limitations:Since consumer price is only one of the social and economic context
attributes.This analysis result may not be enough to undersatand how would the
social and economic context affect the marketing campaign.
Follow-up Steps:Include more social and economic context attributes in the model.
;
proc glm
;
model y = cons.price
;
run;
run;
title;
footnote;