Question: B. Create a macro wrapper that adapts the program shown on the next page so that it can be used with any input and output

B. Create a macro wrapper that adapts the program shown on the next page so that it can be used with any input and output 5A5 data sets and any designated variable {i.e., replacing best) in the input 5A5 data set. The parameters of the macro must include the following items: It The name of the given 5A5 data set. i The name of the variable being summarized in the given 5A5 data set. I' The name of the new 5A5 data set of streak lengths. The new data set must have only two variables. The first variable in the new data set must have the same name and values as the summarized variable from the original data set, with one observation per run (i.e., per streak) of consecutive values in the order those runs occurred. The second variable in the new data set must be named _STREAK_. You may not assume that you know what other variable names are in the given data set, except that the designated variable to be summarized is not named _STREAK_. Apply your macro to the data set weeks_best.sas?bdat and use PROC PRINT to display the new data set
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
