BookmarkSubscribeRSS Feed
cmsunilkumar
Calcite | Level 5

I am new to SAS and still learning. I need to submit my school assignment and posting below questions for which I need some helping hand in completing those.

Deciding an appropriate path for analysis often requires many steps. An important first step is exploring and examining the data. An initial exploratory data analysis provides understanding of the meaning of study variables and can provide crucial clues into data preparations needed before analyzing the data.

 

  1. Open and examine the SASHELP.HEART dataset and its variables. Familiarize yourself with the context and meanings behind the variables and their values.

 

  1. How many observations are in the dataset?

I answered this :- There are total of 5209 observations in the data set.

  1. How many variables are in the dataset? How many are numeric? How many are character?

I answered this :- There are 17 variables in the dataset. 10 variables are numeric & 7 variables are character type.

Exploring the assigned values of character variables can demonstrate patterns and inherent orderings. The default ordering of levels in SAS is alphabetical order. The levels of many character variables have an inherent ordering of magnitude. For example, non-smokers smoke less than light smokers who smoke less than moderate smokers.

 

  1. Tabulate the levels of the character variables in the SASHELP.HEART dataset.  For each of the character variables:

 

  1. What data values or levels are observed for each?

 

  1. Which variables have an inherent ordering of magnitude? Does alphabetical order of the levels correspond to ordering levels by magnitude for any of these character variables?
10 REPLIES 10
Reeza
Super User
Hint PROC FREQ.
cmsunilkumar
Calcite | Level 5

Thank you Reeza..

 

Patrick
Opal | Level 21

And to get a supporting report for the questions you've already answered:

proc contents data=sashelp.heart order=varnum;
quit;

 

AMweneykhondo
Calcite | Level 5
Greetings i am so lost. The professor told us to copy and paste the code. but it keeps giving me errors. I am so frustrated. It is the exact question
vsandoval6
Calcite | Level 5

I'm having issues on the problem:

Tabulate the percent of observations in the SASHELP.HEART dataset that have non-missing values for all the predictor variables that you will use in later analyses: AgeAtStart, BP_Status, Chol_Status, Cholesterol, Diastolic, Height, MRW, Sex, Smoking, Smoking_Status, Systolic, Weight, and Weight_Status.

 

Please help!

andreas_lds
Jade | Level 19

@vsandoval6 wrote:

I'm having issues on the problem:

Tabulate the percent of observations in the SASHELP.HEART dataset that have non-missing values for all the predictor variables that you will use in later analyses: AgeAtStart, BP_Status, Chol_Status, Cholesterol, Diastolic, Height, MRW, Sex, Smoking, Smoking_Status, Systolic, Weight, and Weight_Status.

 

Please help!


This is a new question, too. Please create a new topic and show what you have already tried.

andreas_lds
Jade | Level 19

@AMweneykhondo wrote:
Greetings i am so lost. The professor told us to copy and paste the code. but it keeps giving me errors. I am so frustrated. It is the exact question

Please start a new topic and post the log, so that we see the errors actually.

AMweneykhondo
Calcite | Level 5
How do i post a new log or question?
Reeza
Super User

On the home page, see the left side orange button 'Ask a question'

 

Layout may vary based on your device of course. 

 

Reeza_0-1674774937595.png

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 10 replies
  • 1962 views
  • 5 likes
  • 7 in conversation