Sort the data in awdsuv by highway miles per gallon


Create subset data sets. Using the CARS permanent SAS dataset, write SAS code to do the following:

a. Create a subset (into an SAS data set named SMALL) consisting of all vehicles whose engine size is less than 2.0 L. On the basis of this data set, find the average city and highway miles per gallon for these vehicles. DATA SMALL;SET "C:\SASDATA\CARS"; IF ENGINESIZE LT 2;

b. Create a subset (into an SAS data set named HYBRID) of all hybrid vehicles in the dataset. For these vehicles:

I. List the BRAND and MODEL names.

II. Find the average city and highway miles per gallon.

c. Create a subset (into an SAS data set named AWDSUV) consisting of all vehicles that are both SUVs and have all-wheel drive. For these vehicles:

I. List the BRAND and MODEL names.

II. Use PROC MEANS to find the average city and highway miles per gallon.

d. Sort the data in AWDSUV by highway miles per gallon (smallest to largest). List the BRAND, MODEL, and highway miles per gallon for this sorted data set.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Sort the data in awdsuv by highway miles per gallon
Reference No:- TGS02206135

Expected delivery within 24 Hours