Question: 2. Within the datastep create the following new variables: (a) A new variable called agecat that divides age into 5 categories:45-49;50-54;55-59;60- 64;65-69. Give values 1-5

2. Within the datastep create the following new variables:

(a) A new variable called agecat that divides age into 5 categories:45-49;50-54;55-59;60- 64;65-69. Give values 1-5 for the categories.

(b) A new variable called income40 equal to 0 if income is less than $40,000 and equal to 1 if income is $40,000 or more.

(c) A new variable called collgrad equal to 0 if the participant did not graduate from college and equal to 1 if the participant graduated from college (see study forms for income and education categories)

(d) A new variable that is the lowest of the two serum potassium values

For part D, how would the SAS code be written?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!