Question: Please provide code using SAS. 3. (6 points) Import the data set USPOP using the INFILE statement. Rename the vari- ables (The first row in
Please provide code using SAS.



3. (6 points) Import the data set USPOP using the INFILE statement. Rename the vari- ables (The first row in the .csv file provides names but they are quite lengthy) (a) (3 points) Create the variable mean_pop that gives the empirical mean of the pop- ulation over the years 2010 through 2015. Print the first five observation and only include the name of the state and the variable mean_pop. Hint: Check out the statement VAR of the PRINT procedure (b) (3 points) Create the variable ratio_pop that gives the proportion of the US pop- ulation in each state. Define a lenght for the variable ratio_pop Associate a percentage format for the variable ratio pop (Check the PERCENT format) Give a label for the variable ratio pop and the variable that gives the name of the state Print the observations 10 to 15 and only include the name of the country and the variable ratio_pop. Make sure that the header of the column are the labels of the variables 3. (6 points) Import the data set USPOP using the INFILE statement. Rename the vari- ables (The first row in the .csv file provides names but they are quite lengthy) (a) (3 points) Create the variable mean_pop that gives the empirical mean of the pop- ulation over the years 2010 through 2015. Print the first five observation and only include the name of the state and the variable mean_pop. Hint: Check out the statement VAR of the PRINT procedure (b) (3 points) Create the variable ratio_pop that gives the proportion of the US pop- ulation in each state. Define a lenght for the variable ratio_pop Associate a percentage format for the variable ratio pop (Check the PERCENT format) Give a label for the variable ratio pop and the variable that gives the name of the state Print the observations 10 to 15 and only include the name of the country and the variable ratio_pop. Make sure that the header of the column are the labels of the variables
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
