Given the following code:
Which variables are created with the BY statement?
In SAS, when you use a BY statement in a DATA step, SAS creates two temporary variables for each variable listed in the BY statement: one to indicate the first occurrence (FIRST.variable) and another to indicate the last occurrence (LAST.variable) of the value within the BY-group. Given the provided code and assuming that State is the variable used in the BY statement, SAS will create First.State and Last.State. Thus, option A is correct.
SAS documentation on the BY statement, SAS Institute.
Currently there are no comments in this discussion, be the first to comment!