Question: Directions: Using SAS perform the necessary coding and calculations. DO NOT perform calculations outside of the program and input the results. Please explain your work

Directions: Using SAS perform the necessary coding and calculations. DO NOT perform calculations outside of the program and input the results. Please explain your work with comments, carefully explaining why you did each step that you did. In addition, when you are asked to analyze or comment on a statistical output include this too.

1. The data in the Excel file Data1 contains the data on the average daily temperature in C and average daily wind speed in m/s for May and March. The file contains three variables: Date, AverageTemperature and AverageWind.

SAS is opened and the data from the Excel is imported into a data through the following syntax:

Proc Import datafile = "< insert file name and path > "

out = Data1

DBMS = xlsx

replace;

getnames = yes;

run;

2. Create a new data set called Data2 where you read in the data from the data set created in part 1. like this

Data Data2;

set Data1: * reads in all the data from dataset data1;

< fill in more code here as instructed below>

run:

c) In your new data set, you will need to calculate the wind chill of each day. To do this you can either create two new variables to convert the AverageTemperature from Celsius to Fahrenheit and AverageWind from m/s to mph, or you can embed these conversions in your wind chill formula

(1) Look up the conversion for Celsius to Fahrenheit if you don't know it.

(2) To convert the AverageWind in m/s to mph, multiply the AverageWind in m/s by 2.2369 or

AVERAGEWINDMPH = 2.2369*AverageWind

(3) Create a new variable for wind chill and calculate the daily wind chill using the following formula:

wind chill = 35.74 + 0.6215Ta-35.37v0.16+0.4275Tav0.16

where Ta is the temperature in Fahrenheit and v is the wind speed in mph.

d) Using Proc Means, calculate the mean wind chill for this time period using the code

Proc Means data = ;

var ;

run;

Identify the mean wind chill.

e) Plot the wind chill vs the date with blue circles and joining the data using the following syntax

symbol value = "circle" color = blue I = Join;

Proc Gplot data = ;

plot *date/vref = ;

run;

*** Don't be surprised if you get two graphs if you run the code now. It is a glitch in SAS OnDemand.

Notice how cold if felt in Chicago at the end of January. Darn cold!!!!

f) Sort the data by wind chill using the following syntax

Proc Sort data = ;

by ;

run;

g) Print the date and wind chill only using Proc Print;

Proc Print data = ;

var Date ;

run;

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!