I am running a proc mixed model to estimate reaction times (rt) as a function of valence (categorical variable with 2 levels: negative and neutral) and blackness (blackness_cent; continuous variable).
I need to get an estimate for reaction times when the valence is solely negative and blackness is low (1 sd below mean (4.1333714)) vs. medium (mean). I am unsure how to get this specific type of estimate. The first three estimates are looking at reaction times for negative vs. neutral at different levels of blackness. The second set of three estimates look at solely negative reaction times at varying degrees of Blackness. The third set of three estimates is the same except looking solely at neutral reaction times. But I want to get reaction times for solely negative when blackness is low vs. medium (and low vs. high and medium vs. high). Below is the code. Any help would be appreciated!!
Hi,
When I am struggling with how to write an ESTIMATE statement, I find it helpful to write the coefficients in Excel then simply subtract.
Neg, Low (Col B) | Neg, Med (Col C) | Neg, High (Col D) | Neg, Low vs Med (B-C) | Neg, Low vs High (B-D) | Neg, Med vs High (C-D) | |
Intercept | 1 | 1 | 1 | 0 | 0 | 0 |
Valence=Neg | 1 | 1 | 1 | 0 | 0 | 0 |
Valence=Not Neg | 0 | 0 | 0 | 0 | 0 | 0 |
Blackness_cent | -4.13 | 0 | 4.13 | -4.13 | -8.26 | -4.13 |
Blackness_cent*Valence=Neg | -4.13 | 0 | 4.13 | -4.13 | -8.26 | -4.13 |
Blackness_cent*Valence=Not Neg | 0 | 0 | 0 | 0 | 0 | 0 |
Your code is mostly there! You have nine ESTIMATE statements in your code. Columns B-D above match the coefficients of your ESTIMATE statements 4-6 (your second block). To compare your estimates in your second block, simply subtract their coefficients. This is what is shown in last three columns above.
So- you'd use ESTIMATE statements with the coefficients in the last three columns.
In my terminology, you want to get a predicted value (not an estimate) for the case where valence is solely negative and blackness is low. So, I can explain how you get predicted values from the fitted model. I hope you will write back and make it clear if my understanding is wrong and you don't want predicted values.
How do you get these predictions? I will let @Rick_SAS explain in his blog:
https://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html
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.