Help!
There is a question:
Is the mean cholesterol level of current and former smokers different from the mean cholesterol of the general population?
Which test am I using? and what is the catergorical and variable? I am so confused.
Categorical => assigns categories. In this case that would be a variable that indicates whether a person is a current/former smoker or Non-smoker. Shouldn't really think vs "general pop", the other group as to be separated based on the characteristic of interest.
Since you are asking about the mean cholesterol then likeliest is a T-test. The input data would expect to use two variables, one the category of smoker/ non-smoker and the other the measured cholesterol.
The basic approach would be something like:
Proc Ttest data =have; class smokerstatus; var cholestorol; run;
The class variable can have only two values (or have a format apply that creates exactly two levels). Any record missing the class variable will be excluded.
The Ttest expects the data to have equal variance. If you have evidence, such as from running Proc Univariate on your data with similar grouping, that the variances are not the same between groups then you would adjust by using the COCHRAN option on the proc statement to tell the proc to use a different comparison calculation.
Categorical => assigns categories. In this case that would be a variable that indicates whether a person is a current/former smoker or Non-smoker. Shouldn't really think vs "general pop", the other group as to be separated based on the characteristic of interest.
Since you are asking about the mean cholesterol then likeliest is a T-test. The input data would expect to use two variables, one the category of smoker/ non-smoker and the other the measured cholesterol.
The basic approach would be something like:
Proc Ttest data =have; class smokerstatus; var cholestorol; run;
The class variable can have only two values (or have a format apply that creates exactly two levels). Any record missing the class variable will be excluded.
The Ttest expects the data to have equal variance. If you have evidence, such as from running Proc Univariate on your data with similar grouping, that the variances are not the same between groups then you would adjust by using the COCHRAN option on the proc statement to tell the proc to use a different comparison calculation.
THANK YOU
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Save $200 when you sign up by March 14!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.