forked from stat697-s19/team-2_project_repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSTAT697-01_s19-team-2_data_analysis_by_LL.sas
195 lines (156 loc) · 6.72 KB
/
STAT697-01_s19-team-2_data_analysis_by_LL.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
*******************************************************************************;
**************** 80-character banner for column width reference ***************;
* (set window width to banner width to calibrate line length to 80 characters *;
*******************************************************************************;
* 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 will generate final analytic file;
%include '.\STAT697-01_s19-team-2_data_preparation.sas';
*******************************************************************************;
* Research Question Analysis Starting Point;
*******************************************************************************;
ods listing style=listing;
ods graphics / width=8in height=8in;
title1
'Question: What is the distribution of days on drug and duration of adverse
reaction for placebo and non placebo patients?';
title2
'Rationale: This would help formulate more questions around how some patients
react whether age, weight and/or sex could be a factor.';
footnote1
'Here we can see that majority of the placebo and drug groups stay within a
one to one days on drugs and reaction but there are a few that have a high
adverse reaction for such a low amount of time on the drug or placebo';
footnote2
'I find this to be significant because it is not limited to just the drug
but also appears with the placebo and I would like to know what factors
might play a part within these individuals to cause such a reaction.';
footnote3
'I think it might have to do with ones physical measurements either their
weight, age or perhaps their sex. Perhaps there is a sweet spot that
these individuals fall under that could help eliminate outliers in
further studies.';
*
Note: This compares the column Day_On_Drug and ADR_Duration with
Treatment_Group from Placebo and Treatment.
Limitations: Some limiations might include that our adr_duration and
Day_on_Drug have 0 values and very high values that might skew our data.
Methodology: Here I decided to use a scatterplot in order to compare
both the number of days on the drug with how long the reaction lasts
to see any correlation between the two.
Followup Steps: A possible followup would be to find a way to panel
the plots or possibly do a regresion line to try and gain better
insights.
;
proc sgplot
data = adverser_analytical_file
;
scatter X = day_on_drug Y = adr_duration / group = treatment_group
;
xaxis label = 'Number of Days On Drug';
yaxis label = 'Number of Days for Adverse Reaction';
keylegend /title = "Treatment Group";
run;
proc report
data = adverser_analytical_file;
columns
treatment_group
age
weight
sex;
define treatment_group / group;
define sex / group;
define age / analysis mean;
define weight / analysis range;
run;
title;
footnote;
*******************************************************************************;
* Research Question Analysis Starting Point;
*******************************************************************************;
title1
'Question: Is the duration of the reaction correlated with the age, sex,
weight, and day on drug of the patient?';
title2
'Rationale: Would like to see if the severity and duration align with the same
factors that are significant.';
footnote1
'Here we see the parameter estimates table and find that day on drug is the
only significant factor within our regression test.';
footnote2
'I find this to be interesting since from our initial distribution we saw
that some people would have a very adverse reaction within just a couple
of days while others would have a low reaction from a long usage time.';
footnote3
'I am not sure what to make of these findings but I hope to see if our
other test will align with similar findings.';
*
Note: This compares the column ADR_duration from Placebo and Treatment to the
column Age, Weight, and Sex from Patient_Info
Limitations: Again our issue might be based on how common one severity is
versus the other ones which might prove to lack our correlation with soeme
of the variables.
Methodology: Here I created my categorical variable into a numeric
binary variable with a dummy variable in order set the conditions for
my regression.
Followup Steps: I think I would want to explore more on my model
or possibly involve interaction within my model.
;
proc glmmod
data = adverser_analytical_file
outdesign = adverser_analytical_file_2
outparm= GLMParm
noprint;
class sex;
model adr_duration = day_on_drug age weight sex;
run;
proc reg
data = adverser_analytical_file_2;
DummyVars: model adr_duration = COL2-COL6;
ods select ParameterEstimates;
quit;
title;
footnote;
*******************************************************************************;
* Research Question Analysis Starting Point;
*******************************************************************************;
title1
'Question: Is there a correlation with Severity of reaction from age, weight,
and sex?';
title2
'Rationale: This would help identify any significant factors that contribute to
the severity of the drug reaction.';
footnote1
'Here we see that a moderate reaction is much more significant than a mild
reaction and yet the days on drugs is not as significant as opposed to
our last regression model, yet weight is a factor.';
footnote2
'I find this to be significant because this lines up more with our graph
showing that the amount of time on the drug or placebo does not correlate
with how long their reaction is.';
footnote3
'It is interesting to me why weight is a factor in the reaction but not the
duration. Could this be due to nutrition and if so is there a weight range
that would cause a certain type of reaction?';
*
Note: This compares the column ADR_Severity from Placebo and Treatment to the
column Age, Weight, and Sex from Patient_Info.
Limitations: Might have a limitation for our character variable and how
accurate some of our results might be due to our lack of variety in
ADR_Severity.
Methodology: Here we wanted to check regression on another model to
see how the variables interact with this response and correlate the
differences of significant variables within this model and the other.
Followup Steps: I would probably do a similar approach with adding more
variables into my model and seeing how more efficient my model can be
with different tuning.
;
proc logistic
data = adverser_analytical_file
;
class sex;
model adr_severity = age weight sex day_on_drug;
ods select ParameterEstimates;
run;
title;
footnote;