BookmarkSubscribeRSS Feed
Jep
Obsidian | Level 7 Jep
Obsidian | Level 7

Hello,

I need some help! My first question is that,I am trying to estimate the slope for women(coded 0) and men(coded 1) and the difference in slopes between men and women. There are 4 time points( baseline, 3 months, 6 months and 12 months). As you can see in the proc. mixed statement below, there is a quadratic term in the model and it is significant. My problem is writing an estimate or contrast statement for a model with quadratic terms.

 

My second question is that I modelled time as a continuous outcome but the rate of change is not constant overtime, (it is curvilinear) is it better to model time as discrete in such a situation? If that is the case, how can I obtain the overall mean slope for the 12 month period  for both genders and the overall gender difference?

 

I am using the Enterprise guide environment.

 

proc mixed data=merged;

class  patient gender(ref ='0') t ;

model wt = time gender time*time gender*time  gender*time*time  / s chisq;

repeated t /subject=patient type=un;

run;

 

 

1 REPLY 1
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

Although it is possible to fit a quadratic model to 4 time points, so few points provide very little support for the fit. Unless I had a strong theoretical foundation for using the quadratic model, I probably would incorporate time as a classification (discrete) factor.

 

If the relationship between wt and time is quadratic and if by "slope" you mean the parameter associated with the linear term in the model, then what does slope measure that is of use to you? Looking at only slope in a quadratic model does not make a lot of sense to me, but there may be something about your context that justifies looking at slopes.

 

If time is incorporated as a classification factor and you want to estimate polynomial trends (including linear), then see SAS Usage Note 22912. The examples use GLM, but the ideas are the same for MIXED. As the Usage Note illustrates, regression is interchangeable with ANOVA with polynomial contrasts.

 

If you are interested solely in the linear trend (even if the data appear to follow a quadratic trend), then you could just fit a linear model and skip the need for contrast statements.

 

I hope this helps.

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 1 reply
  • 1364 views
  • 3 likes
  • 2 in conversation