I am recently conducting a longitudinal data analysis by using mixed effects regression. I am using the long format data to do the analysis.
Since my data includes different questionnaires and some questionnaires (A) are answered every week while some are answered every month (B), when I change the data from a wide to a long format, should I leave the week that the participants did not answer (B) blank, or should I copy the last response I have across the months until they have a new response? What about the demographic variable (also measured every month)?
To make it clearer, here is an example:
Do I leave it blank if they do not have answer for that week?
Or should I copy the answer that they have from the first week of the month?
Or is there a better solution suggested?
Since my data includes different questionnaires and some questionnaires (A) are answered every week while some are answered every month (B), when I change the data from a wide to a long format, should I leave the week that the participants did not answer (B) blank, or should I copy the last response I have across the months until they have a new response? What about the demographic variable (also measured every month)?
To make it clearer, here is an example:
Do I leave it blank if they do not have answer for that week?
Participant ID. | week of month | Questionnaire A response (measured every week) | Questionnaire B response (measured every month) | sex |
1 | 1 | 1 | 1 | male |
1 | 2 | 2 | - | - |
1 | 3 | 3 | - | - |
1 | 4 | 1 | - | - |
2 | 1 | 2 | 3 | female |
2 | 2 | 3 | - | - |
2 | 3 | 1 | - | - |
2 | 4 | 2 | - | - |
Participant ID. | week of month | Questionnaire A response (measured every week) | Questionnaire B response (measured every month) | sex |
1 | 1 | 1 | 1 | male |
1 | 2 | 2 | 1 | male |
1 | 3 | 3 | 1 | male |
1 | 4 | 1 | 1 | male |
2 | 1 | 2 | 3 | female |
2 | 2 | 3 | 3 | female |
2 | 3 | 1 | 3 | female |
2 | 4 | 2 | 3 | female |
Or is there a better solution suggested?
Comment