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 points total The data on cost of living indices for a sample of world cities New York 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:
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 observations of the resulting data set.
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 observations of the resulting data set.
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 of the values of Groceries and Restaurant ie Groceries Restaurant Create a second variable called Diff which is the difference between WCost and CostLiving WCost CostLiving Print just the variables WCost, CostLiving, and Diff for the first observations of the resulting data set.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
