BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
m231
Calcite | Level 5

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.

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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.

 

 

View solution in original post

2 REPLIES 2
ballardw
Super User

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.

 

 

sas-innovate-white.png

Register Today!

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!

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 657 views
  • 2 likes
  • 2 in conversation