Hi, I am trying to check the sample sizes (number of non-missing values) for both a categorical and quantitative variable, within a macro, and print a subtitle if either of them is less than 30. I have tried probably 30 variations of assigning the sample sizes to macro variables and always have some kind of error. %macro ttest2(dsn= , quantvar= , catvar= , siglev= , doplot= ); %let s1 = %sysfunc(count(&quantvar)); %let s2 = %sysfunc(count(&catvar)); %if (&s1 < 30 or &s2 < 30) %then %do; title2 "Warning: sample sizes of &s1 and &s2 may be too small for valid inference"; %end; ... If anyone could tell me how to assign the sample sizes to variables within my macro, I would really appreciate it! Thank you!
... View more