Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Re: Mixed Model Spline Regression Question

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 07-19-2018 09:50 AM
(4619 views)

Hi all,

I have a question about attempting to model a mixed, random intercept/slope repeated measures regression analysis as a spline model, setting distinct knot points at each time period.

The goal of my analysis is to obtain a graphic that depicts a continuous variable on the Y-axis as a score measurement, a categorical time-session measure (equally spaced 2-10, 12) on the X-axis, and have a set of curves representing 702 individual slopes and intercepts (the subjects in our analysis). Ideally, we'd like to have knot points at each individual session, with the slopes of the curves in-between.

I'm not really sure how to go about obtaining/creating a graph as such. I started by performing a random intercept/slope PROC MIXED regression analysis, using the following code:

**ods graphics on;****proc mixed data=Data plots = all order=freq;****model sessionScore = sessionContinuous / solution;****random intercept sessionContinuous / subject = id solution;****run;****ods graphics off;**

This gave me the random intercept and slopes for each individual. I'm assuming I could use these values to create the content in the graph I hypothesized earlier, but am not sure how to do so or where I would start.

Can the random intercept/slopes obtained be used in a graph like this, or would another analysis need to be performed entirely?

Thanks in advance for any help or guidance!

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Your current model assumes a linear relationship between sessionScore and sessionContinuous, rather than some sort of smoothed curve.

For an example of smoothed curves fit to individual subjects, you might find this GLIMMIX example useful: Example 47.6 Radial Smoothing of Repeated Measures Data. Documentation about the radial smoother is here: Radial Smoothing Based on Mixed Models.

Splines are available using the EFFECT statement in GLIMMIX: see Rick Wicklin's blog Regression with restricted cubic splines in SAS and the links within, as well as the GLIMMIX documentation.

I would not expect a graphic with 702 separate curves to be visually useful (too much overplotting, I would think), but you could plot a small sample of the 702.

I hope this helps.

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Your current model assumes a linear relationship between sessionScore and sessionContinuous, rather than some sort of smoothed curve.

For an example of smoothed curves fit to individual subjects, you might find this GLIMMIX example useful: Example 47.6 Radial Smoothing of Repeated Measures Data. Documentation about the radial smoother is here: Radial Smoothing Based on Mixed Models.

Splines are available using the EFFECT statement in GLIMMIX: see Rick Wicklin's blog Regression with restricted cubic splines in SAS and the links within, as well as the GLIMMIX documentation.

I would not expect a graphic with 702 separate curves to be visually useful (too much overplotting, I would think), but you could plot a small sample of the 702.

I hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you so much, again, for all of your help!

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

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.