M11 Workshop STAT674

for this workshop, we are going to use the CITIDAY dataset from SASHELP library.
     check the dataset and have a general understanding of the data structure before proceed;
 
*Q1 (10 pts);
*     Print the value of STOCK MKT INDEX:NY DOW JONES COMPOSITE on the day of Nov 8, 1991.;


*Q2.1 (20 pts);
*    Convert the code above to a macro called PrintDay so that for any given date and any
     intested variable(s), the macro will print the value(s) of the intested variable(s) at
     the given date;
*    Add a title to indicate the result is a daily report as of the assigned date;


*Q2.2(5 pts);
*    Call your macro with the same date and variable in Q1. Make sure you get the same result;


*Q3.1(20 pts);
*    Now create another macro called PrintWeek, that will calculate the min, max and mean of
     the interested variable(s) within the past 7 days of the given date (including the given
     day);
*    Add a title to indicate the result is a weekly report as of the assigned date;


*Q3.2(5 pts);
*    Call your macro with the same date and variable in Q1;


*Q4.1(20 pts);
*    Now you have a daily report macro and a weekly report macro. you can call them in another
     macro definition to make a nested macro. Create a new macro that will print the daily value
     if the given date is a workday(Monday to Friday). Additionally, on Friday also provide a
     weekly report. If the given date is a weekend, print an error message indicating Market is
     closed on that day.
*    To print the error message, create a new data set with only one variable called Error, and
     assign the error message to it as the value. Print this data with proper title;
*    use the macro system option MLOGIC to help debugging the macro. MLOGIC option will tell you
     whether your macro conditional logic is true or false during execution;
    

*Q4.2(10 pts);
*    Use the macro to show the value of the following variables on Nov 4, 8 and 10 in 1991.
     all three variables together at one day in each macro call.
     – STOCK MKT INDEX:NY DOW JONES COMPOSITE
     – INT.RATE:1MO CERTIFICATES OF DEPOSIT, SH
     – FOREIGN EXCH RATE WSJ:CANADA,CANADIAN $;


*Q4.3(10 pts);
*    Observe the result from Q4.2 and answer the following questions:
     -Are there any variables show a clear increasing trend? if so, which one(s)?
     -Are there any variables show a clear decreasing trend? if so, which one(s)?
 

Click here to order similar paper @Udessaywriters.com.100% Original.Written from scratch by professional writers.

You May Also Like

About the Author: admin