Hi there!
I am looking to develop a growth curve model for aggressive behavior over time using a 2 level multilevel model. Each individual was assessed up to 6 time points, so Level 1 = Wave and Level 2 = Participant. The nature of the outcome (aggression) is a count of behaviors that is heavily skewed, so I've been told I should use a negative binomial model. I would like to first evaluate whether there is significant variability in slopes (i.e., test for random slopes) in a null model, and then ultimately include other variables to potentially explain/account for that variability in slopes in subsequent steps. I think I know how to include random intercepts in the null model using PROC GLIMMIX with the following code:
proc glimmix data=AggData method=quad noclprint;
title 'Time Null model';
class PARTID;
model Aggression = Wave / dist=nb link=log s;
random intercept / TYPE=UN subject= PARTID;
run;
When I run this, I get all of the fit statistics, a table of Covariance Parameter Estimates (which I * think * relate to the random intercept?), and the solutions for Fixed Effects.
My questions are:
1) How do I incorporate random slope into this model? I want to allow for each participant to have their own slope over time, but I'm not sure of how to code for that.
2) Is there a way to obtain significance tests or a way to evaluate if the random intercept and slope are significant (i.e., that there is in fact sufficient variability in the participant intercepts and slopes) in the output?
I'm relatively new to SAS so have been struggling to make sense of the online resources and programming documentation to find exactly what I'm looking for. Hoping someone here may be able to help me.
Thank you!
You can add WAVE to your RANDOM statement --
proc glimmix data=AggData method=quad noclprint;
title 'Time Null model';
class PARTID;
model Aggression = Wave / dist=nb link=log s;
random intercept wave / TYPE=UN subject= PARTID;
run;
The Covariance Parameter Estimates table provides the estimates and and standard errors, so you could have a sense of how significant the estimates are. If you wanted to have a p-value, you can use the COVTEST statement in PROC GLIMMIX.
https://go.documentation.sas.com/doc/en/pgmsascdc/v_034/statug/statug_glimmix_syntax06.htm
For example,
covtest zeroG;
Hope this helps,
Jill
You can add WAVE to your RANDOM statement --
proc glimmix data=AggData method=quad noclprint;
title 'Time Null model';
class PARTID;
model Aggression = Wave / dist=nb link=log s;
random intercept wave / TYPE=UN subject= PARTID;
run;
The Covariance Parameter Estimates table provides the estimates and and standard errors, so you could have a sense of how significant the estimates are. If you wanted to have a p-value, you can use the COVTEST statement in PROC GLIMMIX.
https://go.documentation.sas.com/doc/en/pgmsascdc/v_034/statug/statug_glimmix_syntax06.htm
For example,
covtest zeroG;
Hope this helps,
Jill
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.