BookmarkSubscribeRSS Feed
SPW1
Calcite | Level 5

I am trying to perform growth curve modeling for survey data with repeated measures over time on a continuous outcome (HUIARC). To start I have a single predictor I'm interested in which is a 6-level categorical variable (OLTPA).

 

I believe I need to use proc glimmix, but I know proc mixed also has a weight function. I'm not sure if there is a reason to use glimmix vs. mixed. I am struggling with whether my code makes sense from both the use of weights and if I should have included OLTPA in the class statement.

 

ods graphics on;
proc glimmix data=nphs_18 method=quad empirical=classical plots = all;
class caseid OLTPA (ref='Inactive');
model huiarc= time OLTPA / solution ddfm=bw;
random intercept time/subject=caseid type=un weight=WF6DSLS;
covtest 'Is GLM ok?' glm; 
title "Model with OLTPA as a predictor";
run;
ods graphics off;

3 REPLIES 3
SteveDenham
Jade | Level 19

A couple points to consider.  1) Since you have a continuous response variable, the assumption of gaussian distributed errors is probably appropriate. If so, the default RSPL method is likely to be superior to adaptive quadrature (drop method=quad).  2) Is there any reason to believe that the response over time will be identical for each level of OLTPA? If not, you should probably add time*OLTPA to the model. It can be removed if not significant. This follows the analysis of covariance steps in SAS for Mixed Models.

 

Those are the only two things that come to mind.  Once you give this a try, then check the plots to see if the residuals look like the Gaussian assumption is acceptable.

 

SteveDenham

SPW1
Calcite | Level 5

Thank you for this suggestion, I did add an interaction term for OLTPA*TIME, it is significant.  I wanted to verify a couple of things. 

 

1) Because OLTPA is a categorical variable it should be included in the class statement which gives separate effect estimates for each OLTPA category in the outcomes. The same would be true for any categorical covariates I include?

2) I thought that proc glimmix would include each participant regardless of whether data was missing (i.e. maximizes data use), but I noticed in the output it is not using all cases as the "caseid" degrees of freedom is much smaller than my actual sample.

SteveDenham
Jade | Level 19

The answer to point 1 is yes, unless you have many, many ordinal values for the categories.  In that case, it may be better to treat the variable as continuous and leave it out of the CLASS statement.

 

For point 2, the most likely reason for the difference is that the weight value is set to missing.  The model information at the top of the output should list the number of caseid's and their values.  Check against the caseid list to find one that is not included there, and look into that record to see what is missing and cause that particular caseid to be excluded.

 

SteveDenham

 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 394 views
  • 1 like
  • 2 in conversation