Question: SAS studio code please help ( 2 8 points total ) The data on cost of living indices for a sample of world cities (

SAS studio code please help (28 points total) The data on cost of living indices for a sample of world cities (New York =100) is contained in the file, CityCosts.txt. It includes the following variables: City, Country, CostLiving (cost of living index), Rent (rent index), Groceries (grocery cost index), Restaurant (restaurant cost index) and PurchasePower (purchasing power index). Complete the following:
(12 points) Read the data set into SAS using the list style of input such that the full city and country names can be displayed. Print the first 15 observations of the resulting data set.
(8 points) Create a new data step based on a modification of the one used in (a) above. It should read the data as before but also include calculations. The first calculation should create a new variable called AverageCost which is the average of the values of Rent, Groceries, Restaurant, and PurchasePower. Create a second variable called Diff which is the difference between AverageCost and CostLiving (AverageCost - CostLiving ). Print just the variables AverageCost, CostLiving, and Diff for the first 12 observations of the resulting data set.
(8 points) Again, create a new data step based on a modification of the one used in (a) above. Include one calculation to create a new variable called WCost which is the weighted average (65%/35%) of the values of Groceries and Restaurant (i.e.,0.65* Groceries +0.35* Restaurant ). Create a second variable called Diff2 which is the difference between WCost and CostLiving (WCost - CostLiving ). Print just the variables WCost, CostLiving, and Diff2 for the first 12 observations of the resulting data set.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!