Hi everyone, I have stuck when trying to access this raw data. Any help, I really appreciate! Here is my SAS Code: data houseparty;
infile "......\houseparty.txt" missover ;
input house_ID address $21. @30 city $28. @60 state $ @67 ZIP_code
/ First_name_1 $ last_name_1 $ Donation_1
/ First_name_2 $ last_name_2 $ Donation_2
/ First_name_3 $ last_name_3 $ Donation_3
/ First_name_4 $ last_name_4 $ Donation_4 ;
run;
The capture of File : The full question ( Chapter 11: Exercises and Projects for The Little SAS Book ) A political candidate solicits donations through grassroots efforts via small house parties. After the house party, she records the donations to her campaign for each house. The raw data set called HouseParty.dat contains information on the most recent wave of house parties. The variables in this file are house ID, address, city, state, and ZIP code, followed by the name of each attendee and the amount donated at the house party. a. Open the raw data file in a simple editor such as WordPad. In a comment in your program, discuss why this data structure would be difficult to read into SAS with a single INPUT statement and without line pointers. What log messages might you encounter? b. Write a program that will read the raw data into SAS without errors or warnings in the log. The resulting SAS data set should have one observation per attendee with repeating house ID and address information for those at the same house party. c. Calculate the average amount donated by state. Make sure that states names are grouped together appropriately.
... View more