- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi All
The following table is a sample of my data set where the patients are the control before diagnosis and are the case after diagnosis.
New_id |
A1C pre |
A1C Cat pre |
A1C post |
A1C Cat post |
A |
7 |
0 |
6 |
0 |
B |
- |
- |
8 |
0 |
C |
9 |
1 |
- |
- |
D |
10 |
2 |
17 |
3 |
E |
- |
- |
- |
- |
F |
8 |
0 |
7 |
0 |
I would like to compare between the readings of A1C pre and post for each patient, to know if the exposure had an effect on the A1C level and if there is a significance difference.
Thanks for your help
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@ALAA1 wrote:
Hi All
The following table is a sample of my data set where the patients are the control before diagnosis and are the case after diagnosis.
New_id
A1C pre
A1C Cat pre
A1C post
A1C Cat post
A
7
0
6
0
B
-
-
8
0
C
9
1
-
-
D
10
2
17
3
E
-
-
-
-
F
8
0
7
0
I would like to compare between the readings of A1C pre and post for each patient, to know if the exposure had an effect on the A1C level and if there is a significance difference.
Thanks for your help
Typically to make any statistically reliable statement about what I have highlighted in blue above you have to include all of the patients. One of the typical tests would be to test if the mean difference across all patients, or subgroups of patients such as gender, age or some such, is larger or smaller. One the tests used for such is a Paired t-test which tests if the mean difference between the before and after is 0 or not.
Another test might be a sign test, compare the before/after just in a larger/smaller way (magnitude makes no difference). This basically tests whether there is any difference in before/after.
But you use all of the patients. Why do you think they bothered to collect data from more than one patient?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Not really!
I will explain more
each patient is a control before exposure (diagnosis) and after exposure (diagnosis) is become a case ( within patient comparison).
So, each patient has one reading as a control which is A1C pre (actual reading) and A1C cat pre (category) and one reading as a case which is A1C post (actual reading) and A1C cat post (category).
I hope you that I explained it well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
To perform paired post-pre tests, create new variables for the change in values and test for location with proc univariate:
data have;
input New_id $ A1Cpre A1CcatPre A1Cpost A1CcatPost;
datalines;
A 7 0 6 0
B . . 8 0
C 9 1 . .
D 10 2 17 3
E . . . .
F 8 0 7 0
;
data change;
set have;
A1Cchange = A1Cpost - A1cpre;
A1CcatChange = A1CcatPost - A1CcatPre;
run;
proc univariate data=change;
var A1Cchange A1CcatChange;
run;
Look at the Tests for Location table.
Note: this is assuming that both your variables are ordinal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@ALAA1 wrote:
Hi All
The following table is a sample of my data set where the patients are the control before diagnosis and are the case after diagnosis.
New_id
A1C pre
A1C Cat pre
A1C post
A1C Cat post
A
7
0
6
0
B
-
-
8
0
C
9
1
-
-
D
10
2
17
3
E
-
-
-
-
F
8
0
7
0
I would like to compare between the readings of A1C pre and post for each patient, to know if the exposure had an effect on the A1C level and if there is a significance difference.
Thanks for your help
Typically to make any statistically reliable statement about what I have highlighted in blue above you have to include all of the patients. One of the typical tests would be to test if the mean difference across all patients, or subgroups of patients such as gender, age or some such, is larger or smaller. One the tests used for such is a Paired t-test which tests if the mean difference between the before and after is 0 or not.
Another test might be a sign test, compare the before/after just in a larger/smaller way (magnitude makes no difference). This basically tests whether there is any difference in before/after.
But you use all of the patients. Why do you think they bothered to collect data from more than one patient?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
please can provide me with the codes of paired t test?
and should I multiple impute the missing data?