To receive credit for this assignment the following criteria must be met.
- You must submit your complete program summary as a pdf in
- It must contain the entire code, log, and results
- It must not contain any unnecessary output in the
- You must submit your complete SAS code as a .SAS
- The assignment must be turned in on or before the due
Templates and output data sets for comparison are located at: /courses/df6689e5ba27fe300/IntroSAS/MISC/HW5/
Part I: Modify hwdata.shell to match the other files.
- This part should contain one DATA
- Create two numeric variables current and capacity using input() and scan() to pull the information from the amount variable.
- Remove the variable amount from the output data
- Name the modified data set‘shell_mod’.
Part II: Concatenate hwdata.nat, shell_mod, and hwdata.ogg in that order.
- This part should contain one DATA
- Create a new variable prop, which is current /
- Create a new numeric variable time from the variable pulled using timepart(), apply the timeampm
- Create a new variable timegrp fromtime:
- 00:00 up to and including 10:00:Dawn
- Greater than 10:00 up to and including 15:00:Midday
- Greater than 15:00 and including 24:00:Evening
- Only keep location, timegrp, time, and prop in the new data set. Order is not
- Use data set options to make sure all sets have matching variable
Part III: Calculate the average value of prop within location and timegrp
- This part should contain one procedure step.
- All output from this procedure to the results tab should be
- The output set should be named mymeans and contain only the variables location, timegrp, n, average, and stdev. Order is not
- Use the data set options rename and drop to rename _freq_ to n and drop _type_ from the final
Part IV: Merge work.stacked and work.mymeans (in that order) on location and timegrp.
- This part should contain one DATA step and two procedure
- The output set should be named‘merged’.