BookmarkSubscribeRSS Feed
wj2
Quartz | Level 8 wj2
Quartz | Level 8

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:

  1. First, use a multi-level growth curve model (proc mixed?) to fit pain scores during each time period, controlling for fixed effects of time, and random effects for person (intercepts) and time (slope).
  2. Next, I would like to extract individual estimates of pain intercepts and time slopes from the model to include in a separate dataset (similar to shown below for ‘Want’). This information will be used as predictor variables for another model later on.
  3. Finally, I would like to create a plot that shows individual time slopes for patients in the 25th percentile (decrease in pain over time) and a separate plot that shows individual time slopes for patients in the 75th percentile (increase or little change in pain over time).

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

…..

…..

4 REPLIES 4
SteveDenham
Jade | Level 19

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

wj2
Quartz | Level 8 wj2
Quartz | Level 8

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:

  1. First, use a multi-level growth curve model (proc mixed?) to fit pain scores during each time period, controlling for fixed effects of time, and random effects for person (intercepts) and time (slope).
  2. Next, I would like to extract individual estimates of pain intercepts and time slopes from the model to include in a separate dataset (similar to shown below for ‘Want’). This information will be used as predictor variables for another model later on.
  3. Finally, I would like to create a plot that shows individual time slopes for patients in the 25th percentile (decrease in pain over time) and a separate plot that shows individual time slopes for patients in the 75th percentile (increase or little change in pain over time).

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

…..

…..

STAT_Kathleen
SAS Employee

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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

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.

Discussion stats
  • 4 replies
  • 636 views
  • 3 likes
  • 4 in conversation