My data is long data and I have given an example of how it looks below.
I have 250 people with multiple observations over 1 to 25 years. I have recorded the data long.
Now I would like to do a logistic regression but I am struggling to to this in the long form. Do I need to use the "panel logistic regression" option?
My dependent variable is binary (event 1=yes 0=no).
variables I would like to put into my model are
1. gender
2. age of person at time of examination (continuous)
3. age of X (continuous)
4. disease 1 type (categorical)
5. maximum ever stage for disease 2 (ordinal categorical 1 to 4)
My problem is we know that the event is related to "age of X" with 50% of people experiencing this by 15 years. Also the event is related to disease 2 stage (with stage 3/4 occuring more often with the event 1) BUT we know that as most people age they people develop some stage of disease 2. Is there a way I can factor all this into my logistic regression please?
I would be so grateful for your thoughts and sorry if my questions are basic.
Many thanks,
Observation | ID | age of person at time of examination | age of X | event | disease 1 type | disease 2 stage | maximum ever stage for disease 2 | gender |
1 | 1 | 30 | 4 | 1 | 2 | 1 | 2 | 1 |
2 | 1 | 31 | 5 | 1 | 2 | 1 | 2 | 1 |
3 | 1 | 33 | 6 | 1 | 2 | 2 | 2 | 1 |
4 | 1 | 35 | 8 | 1 | 2 | 1 | 2 | |
5 | 1 | 36 | 9 | 1 | 2 | 2 | 2 | |
6 | 2 | 24 | 1 | 0 | 4 | 1 | 3 | |
7 | 2 | 25 | 2 | 0 | 4 | 1 | 3 | |
8 | 2 | 26 | 3 | 0 | 4 | 3 | 3 | |
9 | 2 | 27 | 4 | 0 | 4 | 2 | 3 | |
10 | 3 | 38 | 6 | 1 | 1 | 3 | 4 | |
11 | 3 | 39 | 7 | 1 | 1 | 3 | 4 | |
12 | 3 | 42 | 11 | 1 | 1 | 4 | 4 | |
13 | 3 | 43 | 12 | 1 | 1 | 4 | 4 | |
14 | 3 | 44 | 13 | 1 | 1 | 4 | 4 |
0 Response to logistic regression ? panel data
Post a Comment