NEW
Font size
WorksheetsSAS PG2 - Data Transformation
Total questions: 10
Worksheet time: 5mins
Which function can be used to replace text?
TRIM
INDEX
TRANWRD
PROPCASE
Which of the following is a valid function for finding the average of X1, X2, and X3?
AVERAGE(X1,X2,X3)
MEAN(X1,X2,X3)
AVG(X1,X2,X3)
MU(X1,X2,X3)
What will SAS return for the value of X?
X = MIN(SUM(1,2,3),56/8,N(8));
1
6
8
.
What will be the value of Quarter in the following statement?
Quarter = QTR(MDY(04,05,2063));
1
2
3
4
Which type of DATA step statement can be used to initialize a variable to a specified value?
sum
RETAIN
Both of the above
Neither of the above
Which of the following is considered a sum statement in the DATA step?
X = A + B;
X = SUM(A,B);
A + B;
All of the above
Which WHERE statement using a mnemonic operator is equivalent to the following WHERE statement using a symbolic operator?
WHERE Temp ~= . ;
WHERE Temp IS NOT MISSING ;
WHERE Temp CONTAINS . ;
WHERE Temp IN (.) ;
All of the above
To print only the variables Q1, Q2, and Q3 using PROC PRINT, which VAR statement could you use?
VAR Q1,Q2,Q3;
VAR Q1 Q2 Q3;
VAR (Q1 to Q3);
All of the above
What is true about formats assigned to variables in the DATA step?
They affect the stored values of variables in the data set
They need to be specified for variables during subsequent procedures where you wish to use them
They need to be specified for variables during subsequent DATA steps where you wish to use them
None of the above
For the value 5678 to appear as 5,678.00 in the output which format should be used?
COMMA6.2
COMMA7.2
COMMA7.3
COMMA8.2
