This question will ask you to provide a segment of missing code.
The following code is used to create missing value indicator variables for input variables, fred1 to fred7.
Which segment of code would complete the task?
A.
B.
C.
D.
This question will ask you to provide a segment of missing code.
The following code is used to create missing value indicator variables for input variables, fred1 to fred7.
Which segment of code would complete the task?
A.
B.
C.
D.
The correct answer is B. This segment of code correctly identifies missing numeric values and assigns the result to the missing value indicator variables. In SAS, numeric missing values are represented by a period ('.'). The code 'mi{i}=(x{i}=.)' creates an indicator variable for each 'fred' variable indicating whether it is missing (1 if missing, 0 if not). Hence, the correct completion for this task is option B.
B is the correct answer
The answer is B if the missing data is numeric and it is A if the missing data is a character