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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.