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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started