BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Ming_Yen_Lin
Calcite | Level 5

I try to use proc glimmix to model the relationship of one dependent variable and one independent variable with restricted cubic splines (RANGEFRACTIONS(0.05 0.275 0.5 0.725 0.95)). The dependent variable is one repeated continuous outcome. From previous posts, I understand it is not intuitive when we would display the effect of an independent variable with restricted cubic splines through parameters estimated by regression on one dependent variable. Are there any online experts who can offer advice on presenting such a relationship?

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ
Yes, you can add the FIT option using the original variable, AGE, as you showed to plot the fitted spline model. But specifying FIT isn't necessary if there is only a single predictor in the model.

View solution in original post

4 REPLIES 4
StatDave
SAS Super FREQ

I don't think this is a problem. You could proceed similarly to as discussed and illustrated for a logistic model in this note - see the latter section titled "Odds Ratio for Increase in Predictor in a Spline Model". While GLIMMIX does not have an EFFECTPLOT statement, you can simply save the model with a STORE statement and then use the saved model in PROC PLM which has an EFFECTPLOT statement. Using example longitudinal data for the Getting Started: Generalized Estimating Equations section of the GENMOD documentation, the following displays the fitted model using a random intercepts model from GLIMMIX.

proc glimmix data=six;
effect sage=spline(age/naturalcubic);
model wheeze =  sage / dist=bin s;
random intercept / subject=case ;
store glim;
run;
proc plm restore=glim;
effectplot / link;
run;

Ming_Yen_Lin
Calcite | Level 5

Thank you for the valuable suggestions. It helps me a lot! 
My further question is 
As you provided SAS codes:
I would reflect the modeling results through your codes. Should I just put "age" or "sage" in your codes to reflect the natural cubic spline relationship between age and wheeze?  

proc plm restore=glim;
effectplot fit(x=sage) / link;
run;




StatDave
SAS Super FREQ
Yes, you can add the FIT option using the original variable, AGE, as you showed to plot the fitted spline model. But specifying FIT isn't necessary if there is only a single predictor in the model.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 1479 views
  • 6 likes
  • 3 in conversation