Hello Community,
I am working with a healthcare dataset structured similar to as shown below ('Have'), which includes repeated measures of pain scores nested within patients. The variable ‘time’ indicates when each pain score was collected in relation to the number of days from the baseline score (time=0). Please note the time period nor the time pain scores were collected are not necessarily the same for each patient.
What I need to do is the following:
Any help with how to do this would be greatly appreciated!! Please let me know if I can provide any other information.
Have:
Patient_id | Time | Pain_score |
1 | 0 | 9 |
1 | 65 | 7 |
1 | 110 | 7 |
1 | 175 | 8 |
2 | 0 | 4 |
2 | 30 | 2 |
3 | 0 | 9 |
3 | 35 | 6 |
3 | 40 | 3 |
3 | 50 | 0 |
Want:
Patient_id | Intercept | Slope |
1 | ….. | ….. |
2 | ….. | ….. |
3 | ….. | ….. |
For each of the bullet points:
1. Check the documentation for examples of growth curves (PROC MIXED and GLIMMIX). There are some good ones in both.
2. The individual intercepts and slopes can be obtained with the SOLUTION option on the RANDOM statement in MIXED, and obtained with a bit of programming from the results of the RANDOM statement in GLIMMIX.
3. You will need to calculate the pctile cutpoints and get the first quartile data in one dataset and the fourth quartile in another. From there, PROC SGPLOT should enable what you want. There are other options that utilize paneled plots.
SteveDenham
Hello Community,
I am working with a healthcare dataset structured similar to as shown below, which includes repeated measures of pain scores nested within patients. The variable ‘time’ indicates when each pain score was collected in relation to the number of days from the baseline score (time=0). Please note the time period nor the time pain scores were collected are not necessarily the same for each patient.
What I need to do is the following:
Any help with how to do this would be greatly appreciated!! Please let me know if I can provide any other information.
Have:
Patient_id | Time | Pain_score |
1 | 0 | 9 |
1 | 65 | 7 |
1 | 110 | 7 |
1 | 175 | 8 |
2 | 0 | 4 |
2 | 30 | 2 |
3 | 0 | 9 |
3 | 35 | 6 |
3 | 40 | 3 |
3 | 50 | 0 |
Want:
Patient_id | Intercept | Slope |
1 | ….. | ….. |
2 | ….. | ….. |
3 | ….. | ….. |
In addition to the examples in the documentation that Steve recommended, the following SAS Usage Notes :
https://support.sas.com/kb/22/882.html
https://support.sas.com/kb/37/110.html
provide information on estimating growth curve models.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.