Hello Everyone!
I am trying to run a MLM using "Proc mixed" (see code below). The model has a LEVEL 1 PREDICTOR which is identical for each subject. Specifically, people heard one of 8 different noise levels, and we subsequently tested reaction time to complete math problems. This noise level variable is an interval variable with possible values of 1,2,3,4,5,6,7,8. Importantly, I would like to let this level 1 predictor be random, so as to model individual differences in the IV/DV slope.
My PROBLEM/question is that Proc Mixed seems to recognize the fact that there is no between-person variance in this predictor, and so appears to not be modeling individual differences in the IV/DV slope. I'll paste in the results for Covariance Parameter Estimates below, with the problem being the UN(2,2) parameter is not estimated.
Am I correct in assuming SAS is not modeling individual differences in the IV/DV slope? And how can I coax it to model these effects?
Thanks so much!!
Robbie
Covariance Parameter Estimates | ||||||
Cov Parm | Subject | Estimate | StandardError | Z Value | Pr Z | |
UN(1,1) | Subject | 0.02698 | 0.003031 | 8.9 | <.0001 | |
UN(2,1) | Subject | 2.10E-06 | 0.000257 | 0.01 | 0.9935 | |
UN(2,2) | Subject | 0 | . | . | . | |
Residual | 0.05797 | 0.000519 | 111.61 | <.0001 |
PROC Mixed NOITPRINT NOCLPRINT COVTEST MAXITER=250; CLASS Subject;
MODEL Math_reaction_time = Noise_level
/ SOLUTION DDFM=BW COVB NOTEST;
RANDOM INTERCEPT Noise_level /SUB=Subject TYPE=UN; ODS EXCLUDE NOBS; RUN;
In the absence of other details, I doubt that Noise_level is a random effects factor. I would think it would be fixed. You do not need Noise_level to be a random effects factor to model "individual differences in the IV/DV slope".
If Noise_levels 1...8 are not the same for each subject, the model is still correct (although it might require modifications, depending on the actual noise levels for each subject); however unequal levels does not imply that Noise_level is a random effects factor: it is still fixed.
Your model seems consistent with your description of the study design. Things I would consider:
1) There actually is little variance in slopes among subjects, and so the variance among slopes is set to zero by the algorithm. Visually, you could assess this by plotting the observed data appropriately. (Always plot your data.)
(2) The UN type is not adequately supported by the data. (Most data sets that I work with have this problem; you need a large sample size to be consistently successful with UN.) Try setting the intercept-slope covariance to zero.
(3) Try rescaling the response variable to see what effect that has on your estimates. Consult
https://support.sas.com/resources/papers/proceedings15/SAS1919-2015.pdf and
http://support.sas.com/resources/papers/proceedings12/332-2012.pdf
for this and other modifications that might help.
I sense that your understanding of random coefficient models is not fully complete, and thus you have appreciable confusion. The idea of a random coefficients model is that the model is fitting a regression (in your model, this regression is linear) of Math_reaction_time on Noise_level for each subject in the framework of a hierarchical model, such that Noise_level is a fixed effects factor and Subject is a random effects factor. There may be variance among intercepts, there may be variance among slopes, and there may be a covariance between intercepts and slopes.
I hope this helps.
In the absence of other details, I doubt that Noise_level is a random effects factor. I would think it would be fixed. You do not need Noise_level to be a random effects factor to model "individual differences in the IV/DV slope".
If Noise_levels 1...8 are not the same for each subject, the model is still correct (although it might require modifications, depending on the actual noise levels for each subject); however unequal levels does not imply that Noise_level is a random effects factor: it is still fixed.
Your model seems consistent with your description of the study design. Things I would consider:
1) There actually is little variance in slopes among subjects, and so the variance among slopes is set to zero by the algorithm. Visually, you could assess this by plotting the observed data appropriately. (Always plot your data.)
(2) The UN type is not adequately supported by the data. (Most data sets that I work with have this problem; you need a large sample size to be consistently successful with UN.) Try setting the intercept-slope covariance to zero.
(3) Try rescaling the response variable to see what effect that has on your estimates. Consult
https://support.sas.com/resources/papers/proceedings15/SAS1919-2015.pdf and
http://support.sas.com/resources/papers/proceedings12/332-2012.pdf
for this and other modifications that might help.
I sense that your understanding of random coefficient models is not fully complete, and thus you have appreciable confusion. The idea of a random coefficients model is that the model is fitting a regression (in your model, this regression is linear) of Math_reaction_time on Noise_level for each subject in the framework of a hierarchical model, such that Noise_level is a fixed effects factor and Subject is a random effects factor. There may be variance among intercepts, there may be variance among slopes, and there may be a covariance between intercepts and slopes.
I hope this helps.
Thanks so much for the clarification!
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 16. Read more here about why you should contribute and what is in it for you!
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.