For the variables C1-C5 in data set CHARI (problem 18.1), change all lowercase values to uppercase, and set any remaining values other than 'Y', 'N', or blank to missing. You may wish to use an ARRAY...


For the variables C1-C5 in data set CHARI (problem 18.1), change all lowercase values to uppercase, and set any remaining values other than 'Y', 'N', or blank to missing. You may wish to use an ARRAY to solve this problem.


Problem 18.1


First, create a data set called CHAR1 by running the following DATA step:


Create a new data set ERROR containing any observations in CHARI that meet anyone of the following conditions:


1. A value other than an 'X', 'Y', or 'Z' for the variable STRING1.


2. A value other than an 'A', 'B', 'C', '0', or 'E' in STRING2.


3. A value other than an upper- or lowercase 'N' or 'Y' for the variables C1-C5. (NOTE: Blank values of CI-C5 will place the observation in the ERROR data set.)



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here