The SUM statement in SAS is used to sum values across observations, adding the value of the expression on the right side of the statement to the variable on the left. It does not use an equal sign (eliminating A), only one variable can be on the left-hand side of a SUM statement (eliminating B), and it is not initialized to 1 by default (eliminating D). What makes the SUM statement particularly useful is that it ignores missing values when summing across observations, which means that missing values do not affect the sum (option C is correct).
References:
SAS documentation on the SUM statement, SAS Institute.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit