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

Dear All,

I am a complete newbie to SAS, so apologies for lacks of jargon, and probably posting a very simple and not very stimulating question. My deep appreciation for your help.

 

I have the data-set with the following 2 categories: 

GENDER: Male (1), Female (2)

CAUSE FOR LIMB AMPUTATION: Trauma (1), Vascular with Diabetes (2), Vascular without Diabetes (3), Oncologic (4)

 

My task is to see if there is a higher percentage of female patients whose reason for amputation was 'trauma'.

 

My question is how to extract only count for patients who answered 'trauma' and produce a crosstab, only featuring 'Trauma' x 'Gender'?

 

How can one achieve it using 'Tasks and Utilities' instead of the code?

 

I attach data in case someone wants to fiddle with it.

 

Thank you

 

Agnieszka

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

1. Use an Utilities>Import task to import your data

2. Use a Data>Filter task to get only the Trauma records

3. Use a Statistics>Table Analysis to perform a Chi Square test

 

Documentation for each task specifically can be found here:

https://documentation.sas.com/?activeCdc=webeditorcdc&cdcId=sasstudiocdc&cdcVersion=3.71&docsetId=we...

 


@aczech2001 wrote:

Dear All,

I am a complete newbie to SAS, so apologies for lacks of jargon, and probably posting a very simple and not very stimulating question. My deep appreciation for your help.

 

I have the data-set with the following 2 categories: 

GENDER: Male (1), Female (2)

CAUSE FOR LIMB AMPUTATION: Trauma (1), Vascular with Diabetes (2), Vascular without Diabetes (3), Oncologic (4)

 

My task is to see if there is a higher percentage of female patients whose reason for amputation was 'trauma'.

 

My question is how to extract only count for patients who answered 'trauma' and produce a crosstab, only featuring 'Trauma' x 'Gender'?

 

How can one achieve it using 'Tasks and Utilities' instead of the code?

 

I attach data in case someone wants to fiddle with it.

 

Thank you

 

Agnieszka


 

View solution in original post

2 REPLIES 2
Reeza
Super User

1. Use an Utilities>Import task to import your data

2. Use a Data>Filter task to get only the Trauma records

3. Use a Statistics>Table Analysis to perform a Chi Square test

 

Documentation for each task specifically can be found here:

https://documentation.sas.com/?activeCdc=webeditorcdc&cdcId=sasstudiocdc&cdcVersion=3.71&docsetId=we...

 


@aczech2001 wrote:

Dear All,

I am a complete newbie to SAS, so apologies for lacks of jargon, and probably posting a very simple and not very stimulating question. My deep appreciation for your help.

 

I have the data-set with the following 2 categories: 

GENDER: Male (1), Female (2)

CAUSE FOR LIMB AMPUTATION: Trauma (1), Vascular with Diabetes (2), Vascular without Diabetes (3), Oncologic (4)

 

My task is to see if there is a higher percentage of female patients whose reason for amputation was 'trauma'.

 

My question is how to extract only count for patients who answered 'trauma' and produce a crosstab, only featuring 'Trauma' x 'Gender'?

 

How can one achieve it using 'Tasks and Utilities' instead of the code?

 

I attach data in case someone wants to fiddle with it.

 

Thank you

 

Agnieszka


 

aczech2001
Calcite | Level 5

Thank you so much! This seemed to work!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 699 views
  • 0 likes
  • 2 in conversation