The purpose of this homework is to use SAS to read and combine data from a group of SAS datasets, use these data to perform certain calculations, and subset the data by selecting specific observations. From the class website, download the “ECMT_HW2_DATA.zip” ZIP file. You should copy (or ‘extract’) the 11 different SAS data sets in this zip file into another file folder. The data sets are as follows:
CA_income.sas7bdat These files have County level personal income data for each of the 5 states annually for 1969 – 2019 with variables as follows:
State: 2 digit State FIPS code stored as a character variable with a leading zero (eg. ‘06’)
County: 3 digit County FIPS code stored as a character variable with leading zeros (eg. ‘003’)
GEONAME: State name (when county code=000) or County name and State. Year: 4 digit year.
Personal_Income: Aggregate personal income for the county measured in thousands of dollars.
FL_income.sas7bdat
NY_income.sas7bdat
PA_income.sas7bdat
TX_income.sas7bdat
CA_population.sas7bdat These files have County level population data for each of the 5 states annually for 1969 – 2019 with variables as follows:
State: 2 digit State FIPS code stored as a character variable with a leading zero (eg. ‘06’)
County: 3 digit Count FIPS code stored as a character variable with leading zeros (eg. ‘003’)
GEONAME: State name (when county code=000) or County name and State. Year: 4 digit year.
Population: Population for the county.
FL_population.sas7bdat
NY_population.sas7bdat
PA_population.sas7bdat
TX_population.sas7bdat
US_CPI.sas7bdat Annual data for the U.S. CPI for 1969 – 2019 (YEAR and CPI).
Note that each of these datasets is in SAS data format.
Conceptually, the analysis task is to identify the five counties in each of the five States that had the highest Average Compound Annual Growth Rate in Real Per Capita Personal Income over the period 1969 – 2019.
1. For each state, combine (merge) the personal income and population data into a single dataset matching the County, and Year variables in the two datasets. (Note: Be careful about the sort order of the data in this step). With this combined data, calculate Per Capita Personal Income (PC_Inc) as follows:
ππΆ_πΌπππ‘
= 1000 × ππππ ππππ_πΌππππππ‘
ππππ’πππ‘πππππ‘
2. Again, for each state, combine (merge) the dataset created in Step 1 with the CPI data, matching the Year variable
in the two datasets (careful with sort order). With this combined dataset, calculate Real Per Capita Personal Income (RPC_Inc) as follows:
π ππΆ_πΌπππ‘
= 100 × ππΆ_πΌπππ‘
πΆππΌπ‘
3. From the data set created in step 2, subset the data to only keep data for year 1969, rename the RPC_Inc variable
RPC_Inc_1969, exclude observations related to State-wide totals (when the County variable is 000), and keep only the variables State, County, GEONAME, and RPC_Inc_1969.
4. Again, using the data set created in step 2, subset the data to only keep data for year 2019, rename the RPC_Inc variable RPC_Inc_2019, exclude observations related to State-wide totals (when the County variable is 000), and keep only the variables State, County, GEONAME, and RPC_Inc_20019.
5. For each state, combine (merge) the data sets created in steps 3 and 4 matching the County variable. With this combined data, calculate the Average Compound Annual Growth Rate in Real Per Capita Personal Income for each county as follows
1
π ππΆ_πΌππ_2019 50
π΄πΆπ΄πΊπ = οΏ½ οΏ½
π ππΆ_πΌππ_1969
6. Next, subset the data again to keep only the five counties with the highest ACAGR – think about how you can do this using the “descending” option in the PROC SORT procedure and creating a ranking variable using the automatic variable “_N_” in a data step or using an OBS= option.
7. Finally, combine the subset data from each of the five states into a single dataset with the states “stacked”. You should have a total of 25 observations. Store the data from this final step in a permanent SAS dataset with the filename “Lastname_UIN.”
Once you complete your entire program, clear your LOG window, and re-run the entire program. (This will create a “clean” LOG record, hopefully with no errors). Save a copy of your SAS Log that reflects the steps above (with the Log window active, go to File, Save As) with the filename “Lastname_UIN.log” and upload this log file to Canvas.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme