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

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!

1 ACCEPTED SOLUTION

Accepted Solutions
jiltao
SAS Super FREQ

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

View solution in original post

1 REPLY 1
jiltao
SAS Super FREQ

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

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
  • 735 views
  • 3 likes
  • 2 in conversation