












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!













Which of the following is not a comment in SAS? a. /* I am not a comment / b. * I am not a comment ; c. / * I am not a comment ; */ d. All of the above are valid comments - d. All of the above are valid comments In SAS data sets, missing numeric data are represented by which of the following? Select one: a. A single space b. A single period c. Any number of spaces d. Any of the above - b. A single period Which of the following assignment statements is valid for the numeric variable Score? Select one: a. Score / 100; b. Score = Score / 100; c. Score = 'Score' / 100; d. Score = 'Score / 100'; - b. Score = Score / 100; Which of the following IF-THEN statements will not assign a value of 1 to the variable named Flag for patients with an eye color of blue or brown?
Select one: a. IF EyeColor = 'blue' OR 'brown' THEN Flag = 1; b. IF EyeColor = 'blue' OR EyeColor = 'brown' THEN Flag = 1; c. IF EyeColor IN ('blue', 'brown') THEN Flag = 1; d. All of the above will work - a. IF EyeColor = 'blue' OR 'brown' THEN Flag = 1 Which set of IF-THEN/ELSE statements will run without errors? Select one: a. IF 0 <= Age <= 50 THEN Group = 'A'; ELSE 50 < Age <= 70 THEN Group = 'B'; ELSE Age > 70 THEN Group = 'C'; b. IF 0 <= Age <= 50 THEN Group = 'A'; ELSE IF 50 < Age <= 70 THEN Group = 'B'; ELSE Age > 70 THEN Group = 'C'; c. IF 0 <= Age <= 50 THEN Group = 'A'; ELSE IF 50 < Age <= 70 THEN Group = 'B'; ELSE IF Age > 70 THEN Group = 'C'; d. All of the above will work - c. IF 0 <= Age <= 50 THEN Group = 'A'; ELSE IF 50 < Age <= 70 THEN Group = 'B'; ELSE IF Age > 70 THEN Group = 'C'; The following code will create the variables: car1, car2, car3.
run; - 6 How many times will the following loop execute? Enter a single digit. data loop; x = 5; do while (x < 4); x = x +1; end; run; - 0 How many times will the following loop execute? data loop; x = 3; do until (x <= 6);
x = x + 1; end; run; - 1 If the following code is submitted and then followed by a PROC PRINT, what will be the resulting title in the output? %LET title = The Amazing Race; TITLE '&title'; Select one: a. The Amazing Race b. &title c. title d. '&title' - b. &title Which macro call will invoke the macro named %GETIT? Select one: a. %GETIT b. %GETIT; c. %GETIT();
Select one: a. A column b. A row c. A table d. None of the above - c. A table Which statement does not indicate the end of a DATA or PROC step? Select one: a. STOP b. QUIT c. END d. RUN - c. END By default, SAS will execute the DATA step one time each for which of the following? Select one: a. Variable b. Observation c. Data set d. Procedure - b. Observation The data in the following program are an example of what type of data? DATA readme;
INPUT Place $ Code $; DATALINES; AG 5678 SLO 1234 PB 3456; RUN; Select one: a. Character b. Instream c. Internal raw data d. All of the above - d. All of the above Which statement is synonymous with a DATALINES statement? Select one: a. DATA b. INFILE c. CARDS d. INPUT - c. CARDS What is the main difference in the naming convention for SAS librefs versus SAS variables? Select one: a. Librefs can contain special characters such as $, % and # b. Variable names are case sensitive
d. None of the above - c. PROC PRINT DATA = sasdata.dogs; RUN; When using the following direct reference to create a permanent SAS data set in the Windows operating environment, what does the name dogs refer to? DATA 'c:\MySASLib\dogs'; Select one: a. The drive b. The directory c. The filename d. The libref - c. The filename Which WHERE statement using a mnemonic operator is equivalent to the following WHERE statement using a symbolic operator? WHERE Temp ~= .; Select one: a. WHERE Temp IS NOT MISSING; b. WHERE Temp CONTAINS. ; c. WHERE Temp IN (.); d. All of the above - a. WHERE Temp IS NOT MISSING; To print only the variable Q1, Q2, and Q3 using PROC PRINT, which VAR statement could you use?
Select one: a. VAR Q1, Q2, Q3; b. VAR Q1 Q2 Q3; c. VAR (Q1 to Q3); d. All of the above - b. VAR Q1 Q2 Q3; What is true about formats assigned to variables in the DATA step? Select one: a. They affect the stored values of variables in the data set b. They need to be specified for variables during subsequent procedures where you wish to use them c. They need to be specified for variables during subsequent DATA steps where you wish to use them d. None of the above - d. None of the above n which procedure can you choose to display only the mean, median, and standard deviation in the results? Select one: a. TTEST b. MEANS c. UNIVARIATE d. None of the above - b. MEANS Which procedure can produce descriptive statistics for both character and numeric data? Select one:
b. VBAR year / GROUP = Type GROUPDISPLAY = STACK; c. HBAR Year / GROUP = Type; d. All of the above - d. All of the above Which statement will draw a normal curve in PROC SGPLOT? Select one: a. HISTOGRAM Age / DENSITY; b. DENSITY Age; c. HISTOGRAM Age / NORMAL; d. NORMAL Age; - b. DENSITY Age; You can create a scatter plot with labels on the data points that represent the Y axis values with which of the following statements? Select one: a. SCATTER X = MSRP Y = Invoice; b. SCATTER X = MSRP Y = Invoice / DATALABEL = Invoice c. SCATTER X = MSRP Y = Invoice / DATALABEL = YAXIS; d. All of the above - b. SCATTER X = MSRP Y = Invoice / DATALABEL = Invoice How many different correlations will be calculated with the following PROC CORR? PROC CORR DATA = lines; VAR CR25 CR75 M25 M75;
Select one: a. 4 b. 5 c. 8 d. 10 - a. 4 Which MODEL statement will correctly specify a simple linear regression model with the variable Age predicting the variable Sales? Select one: a. MODEL Age = Sales; b. MODEL Sales = Age; c. MODEL Age * Sales; d. MODEL Sales * Age; - b. MODEL Sales = Age; In a simple linear regression model with one dependent variable and one independent variable, which plot will not be part of the diagnostic panel? Select one: a. A fit plot
c. FREQ d. All of the above - b. SORT Suppose that you have a data set that includes the gender, age, and height of students in a class. Which BY statement will tell SAS to sort the data so that within each age (youngest to oldest), the data will be organized by males (tallest to shortest), followed by females (tallest to shortest)? Select one: a. BY DESCENDING Gender Age DESCENDING Height; b. BY DESCENDING Gender DESCENDING Height Age; c. BY Age DESCENDING Height DESCENDING Gender; d. BY Age DESCENDING Gender DESCENDING Height; - c. BY Age DESCENDING Height DESCENDING Gender; Which option in the PROC SORT statement would tell SAS to sort the following last names in alphabetical order? de Bie De Leon deVere De Mesa Dewey Select one: a. SORTSEQ = LINGUISTIC b. SORTSEQ = ASCII c. NODUPKEY d. None of the above - a. SORTSEQ = LINGUISTIC
Suppose you read the following raw data. What will be the value of the automatic variable N for the last observation in the data set? 123 27 456 xx 789 32 012 31 345 xx Select one: a. 0 b. 1 c. 2 d. 5 - d. 5 Which statement is required when interleaving data sets but not when stacking data sets? Select one: a. SET b. BY c. MERGE d. UPDATE - b. BY Suppose you would like to use the following program to combine the SAS data set DEMOGRAPHICS, which contains the variables ID, Age, Gender, and Date, with the SAS data set MEDICALHX, which contains the variables ID, PreviousTreatment, and Date. Assume that both data sets are sorted by ID. Which of the following will happen? DATA patients;
c. IN= d. WHERE= - c. IN= If you wanted to produce averages and counts in the same output, what procedure could you use? Select one: a. PROC PRINT b. PROC FREQ c. PROC TABULATE d. All of the above - c. PROC TABULATE What is the order of the dimensions in a TABLE statement in PROC TABULATE? Select one: a. Page, row, column b. Page, column, row c. Row, column, page d. Column, row, page - a. Page, row, column If you specify just one dimension in a TABLE statement in PROC TABULATE, which dimension will you get? Select one: a. Rows b. Columns c. Pages
d. You must specify at least two dimensions - b. Columns What does PROC REPORT do by default with no additional statements or options? Select one: a. It will print all observations in the data set if there are any character variables b. It will print variables in the order that they exist in the data set c. It will automatically sum the data if all the variables are numeric d. All of the above - d. All of the above In PROC REPORT, what is the default usage type for numeric variables? Select one: a. ACROSS b. ANALYSIS c. DISPLAY d. NUMERIC - b. ANALYSIS STAT 330 Final