Creates a new variable that is the average of the newly renamed variables from the prompt above. (1 pt) Creates a new categorical variable (be careful of variable length) that bins the Roundness variable into categories (you chose the values for the category names) as follows (3 pts): If Roundness is larger than 0.9085806 give the new variable a character string indicating it is in the largest category If Roundness is larger than 0.8717464 but less than or equal to 0.9085806 give the new variable a character string indicating it is in the middle category Otherwise give the new variable a character string indicating it is in the lowest category
Added by Noelia F.
Close
Step 1
To create a new variable that is the average of the newly renamed variables, you can use the following code: ```sas data new_dataset; set old_dataset; new_variable = (renamed_variable1 + renamed_variable2) / 2; run; ``` Replace `new_dataset` with the name Show more…
Show all steps
Your feedback will help us improve your experience
Rakesh Singhi and 99 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Using the SAS data set Narrow (shown here), create a new data set called Stretch where the five scores for each subject are contained in a single observation, with the variable names S1-S5. S1 is the score at Time 1, S2 is the score at Time 2, etc. Listing of NARROW (first 10 observations): Obs Subj Time Score 001 001 001 001 001 002 002 002 002 002 Your resulting data set Stretch should look like this: Listing of STRETCH: Obs Subj S1 S2 S3 S4 S5 001 001 002 003 004 005
Sri K.
Write a SAS DATA step to read the following data. The data is separated by commas. The list of variables is ID, GENDER, SCORE, DOB (mmddyyyy), and AMOUNT. (Note that the variable AMOUNT is a four-digit integer with a comma format, e.g., 1,). Only input the observations on the condition that the AMOUNT is greater than 1000. (Hint: column input is not proper.) 001,M,99,10/11/1981,1,000 002,F,100,03/23/1982,9,999 003,M,89,04/11/1979,1,200 004,M,77,02/23/1985,5,300
Use PROC SQL to list the values of RBC (red blood cells) and WBC (white blood cells) from the Blood data set. Include two new variables in this list: Percent_RBC and Percent_WBC. These variables are the values of RBC and WBC expressed as a percentage of the mean value for all subjects. The first few observations in this list should look like this:
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD