Hello,
I have a dataset which has observations before and after a treatment in 2 conditions. So I have "post" and "Pre" treatment measurements in condition "A" and "post" and "pre" treatment measurements in condition "B". I want to compare (Post - Pre) in condition A with (Post - Pre) in condition B. For that, I wrote the following code(time represents pre and post):
PROC MIXED method=REML, data=my_data;
class subj_id condition time gender;
model value = time condition gender time*condition;
random int / subject=subj_id type=UN;
contrast 'my_contrast' time*condition 1 -1 -1 1;
RUN;
Because I am new to SAS, I don't know whether this code does the same thing that I want or not. Can you help me to understand it better. Thanks!
Use the E option of the contrast statement, this will tell you what is being multiplied by 1 and what is being multiplied by –1.
contrast 'my_contrast' time*condition 1 -1 -1 1/e;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.