Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write SAS code for the following task: 1) Read in the excel file Data.xlsx to create a temporary SAS dataset 2) Based on the

image text in transcribed

Write SAS code for the following task: 1) Read in the excel file "Data.xlsx" to create a temporary SAS dataset 2) Based on the DOB column, create a new column called Age 3) Based on AdmissionDate and LengthOfStay, create a new column called DischargeDate 4) Based on BaseCharge and DiscountRate, create a new column called DiscountAmount 5) Based on DiscountAmount and BaseCharge, create a new column called TotalCharge 6) Remove the LengthOfStay and DiscountRate columns and ensure all columns, including the original and new, are in the correct format to represent the data, i.e., date, money 7) Checking the data type and displaying the final data table with PROC CONTENTS and PROC PRINT 8) The final dataset should be exported as a csv file named "Output Data.csv" Content from Data.xlsx file PatientID FirstName Last Name Gender DOB Admission Date Length OfStay BaseCharge DiscountRate PATO01 Emily Harris Female 1/9/82 11/15/22 20 521.98 0.27 PATO02 Emily Lee Female 1/10/67 7/12/23 45 544.13 0.03 PATO03 Michael Clark Male 1/8/59 6/30/23 3 430.21 0.46 PATO04 Jane Brown Male 1/7/80 3/22/23 9 445.09 0.13 PATO05 Emily Smith Male 1/3/63 5/4/23 22 910.19 0.18 PATO06 Michael Smith Male 1/9/65 7/7/23 7 695.5 0.35

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

A First Course in General Relativity

Authors: Bernard Schutz

2nd edition

521887054, 978-0521887052

More Books

Students also viewed these Mathematics questions