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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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