BookmarkSubscribeRSS Feed
zaldarsa
Obsidian | Level 7

Hi!

My primary analysis will include investigating the association between adipose depots averaged from visits 0-6 and brain biomarkers. Visits 0-6 were prior to the brain scans. For the sensitivity analysis, I want to look exclusively at participants who have data from visits 0-7 or visits 0-8 or visits 0-9. I wasn't sure how to go about doing this. I tried the code below but it didn't work. Thank you all in advance for your help!

 

data mri2;
set mri;
if wbvy in (0,1,2,3,4,5,6,7) or wbvy in (0,1,2,3,4,5,6,7,8) or wbvy in (0,1,2,3,4,5,6,7,8,9);
run;

 

1 REPLY 1
pink_poodle
Barite | Level 11
data mri1 mri2 mri3;
set mri;
if 0<=wbvy<=9 then do;
output mri1;
if wbvy ne 9 then do;
output mri2;
if wbvy ne 8 then do;
output mri3;
end; end; end;
run;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 278 views
  • 0 likes
  • 2 in conversation