The quotes

Write a SAS DATA step to read the following lines of data. Notice that two commas in a row indicate a missing value, and you want to strip off the quotes from quoted strings (remember there is an INFILE option to do this). The variables are NAME (up to 20 characters), AGE, HEIGHT, and WEIGHT.

The quotes Read More »

Stripped

Given the five lines of data: Write a SAS DATA step to read these data, assigning the four data values to the variables X, Y,C, and Z. Variable C should be a character variable. (Note that the value of variable C in the last line is nine characters.) The double quotes should be stripped off

Stripped Read More »

Sample lines

Using column input, read in NAME, GENDER, and DOB, where NAME is in columns 1-10, GENDER is in column 12, and DOB is in columns 13-22. Note that with column input, you must read the date of birth as a character. You may use the following sample lines to test your program:

Sample lines Read More »

Patient

You are given data values, separated by one or more spaces, representing a patient JD, date of visit. DX code, and cost. Create a SAS data set called OFFICE from these data: NOTES: (1) There is no cost value for patient 3, and the line is not padded with blanks. (2) The maximum length [or

Patient Read More »

Data lines

You have the data lines listed here. The first line is a header line and should not be read (use the INFILE option FIRSTOBS=2). The remaining lines contain an 1.0 number (read this as character), a GENDER, a date of birth (DOB), and two scores (SCORE] and SCORE2). Note that there are some missing values

Data lines Read More »

Female data

You have lines of data containing information on males (GENDER = M) and females (GENDER ~ F). Create a SAS data set consisting of data for females only. Do this by first testing the value of GENDER and only reading the remaining values if the line contains female data. The data layout is DATE in

Female data Read More »

Surveys

You conducted two surveys. Survey ONE format is: Survey TWO format is: All lines of data using the ONE format have a ‘1r in column 12. Lines of data using the TWO format have a ‘2’ in column 12. Create a data set using the following sample data:

Surveys Read More »

The data layout

You receive a text (ASCII) file called FRO DO on a diskette. The data layout is as follows: A few sample records are shown here: You place this diskette in the A: drive of your computer. Write a SAS program that will read this file and do the following: (a) Create a permanent SAS data

The data layout Read More »

Output file

You are given a raw data file (INPUT.DAT) containing three numbers per line, separated by commas. Some sample Lines are as follows: Notice that one of the lines only contains two numbers. Read this data file, using a DATA _NULL_ DATA step, and create another raw data file (OUTPUT.DAT) containing the same data as INPUT.DAT

Output file Read More »

Library

You are given a diskette with two files:SURVEYSAS7BDAT and FORMATS.SAS7BCAT. The former is a SAS data set (compatible with your version of SAS software), and FORMATS.SAS7BCAT is a user-defined format library. You copy these two files to a subdirectory called C: SASDATA 011 your hard disk. Two variables of special interest in th.is data set

Library Read More »

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X