logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Maeve WhitakerPhilosophy
(5/5)

901 Answers

Hire Me
expert
Minakshi AroraManagement
(5/5)

731 Answers

Hire Me
expert
Narender PatelMathematics
(5/5)

518 Answers

Hire Me
expert
Peter BernerGeneral article writing
(5/5)

595 Answers

Hire Me
SAS
(5/5)

The purpose of this homework is to use SAS to read and combine data from a group of SAS datasets

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

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.

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. ThisΒ  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

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

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme