By admin | September 30, 2009

SAS Certified Base Programmer 123 Questions (96)

Exhibit: listing of the SASUSER.HOUSES data set.

Obs style      sqfeet  bedrooms  baths street             price
 1  RANCH      1250    2         1.0   Sheppard Avenue    $64,000
 2  SPLIT      1190    1         1.0   Rand Street        $65,850
 3  CONDO      1400    2         1.5   Market Street      $80,050
 4  TWOSTORY   1810    4         3.0   Garris Street     $107,250
 5  RANCH      1500    3         3.0   Kemble Avenue      $86,650
 6  SPLIT      1615    4         3.0   West Drive         $94,450
 7  SPLIT      1305    3         1.5   Graham Avenue      $73,650
 8  CONDO      1390    3         2.5   Hampshire Avenue   $79,350
 9  TWOSTORY   1040    2         1.0   Sanders Road       $55,850
10  CONDO      2105    4         2.5   Jeans Avenue      $127,150
11  RANCH      1535    3         3.0   State Highway      $89,100
12  TWOSTORY   1240    2         1.0   Fairbanks Circle   $69,250
13  RANCH       720    1         1.0   Nicholson Drive    $34,550
14  TWOSTORY   1745    4         2.5   Highland Road     $102,950
15  CONDO      1860    2         2.0   Arcata Avenue     $110,700

The following SAS program is submitted:

proc report data = sasuser.houses nowd headline;
    column style price;
    where prices lt 100000;
    <insert DEFINE statement here>
    define price / mean width = 9;
    title;
run;

The following ouput is created by the REPORT procedure:

style    price
CONDO    $79,700
RANCH    $68,575
SPLIT    $77,983
TWOSTORY $62,550

Which one of the following DEFINE statements completes the above program and produces the above output?

A. define style / order width = 9;
B. define style / group width = 9;
C. define style / across width = 9;
D. define style / display width = 9;

By admin | September 30, 2009

SAS Certified Base Programmer 123 Questions (95)

Exhibit: Output of a FREQ procedure.

The FREQ Procedure
Style of homes
style Frequency Percent Cumulative Frequency Cumulative Percent
CONDON 4 26.67 4 26.67
RANCH 4 26.67 8 53.33
SPLIT 3 20.00 11 73.33
TWOSTORY 4 26.67 15 100.00
Number of bedrooms
bedrooms Frequency Percent Cumulative Frequency Cumulative Percent
1 2 13.33 2 13.33
2 5 33.33 7 46.67
3 4 26.67 11 73.33
4 4 26.67 15 100.00

The variable STYLE has a permanent label of “Style of homes” and the variable BEDROOMS has a permanent label of “Number of bedrooms”.
Which one of the following SAS programs produced the output shown in the exhibit?

A.

proc freq data = sasuser.houses;
    tables style and bedrooms;
run;

B.

proc freq data = sasuser.houses;
    tables style * bedrooms;
run;

C.

proc freq data = sasuser.houses;
    tables style , bedrooms;
run;

D.

proc freq data = sasuser.houses;
    tables style;
    tables bedrooms;
run;

By admin | September 30, 2009

SAS Certified Base Programmer 123 Questions (94)

Unless specified, which variables and data values are used to calculate statistics in the MEANS procedure?

A. non-missing numeric variable values only
B. missing numeric variable values and non-missing numeric variable values only
C. non-missing character variables and non-missing numeric variable values only
D. missing character variables, non-missing character variables, missing numeric variable values, and non-missing numeric variable values

By admin | September 29, 2009

SAS Certified Base Programmer 123 Questions (93)

The following SAS program is submitted:

proc sort data = sasuser.houses out = houses;
    by style;
run;

proc print data = houses;
    <insert statement(s) here>
run;

Click on the Exhibit button to view the report produced.

style     bedrooms baths price
CONDO     2        1.5   80050
          3        2.5   79350
          4        2.5   127150
          2        2.0   110700
RANCH     2        1.0   64000
          3        3.0   86650
          3        1.0   89100
          1        1.0   34550
SPLIT     1        1.0   65850
          4        3.0   94450
          3        1.5   73650
TWOSTORY  4        3.0   107250
          2        1.0   55850
          2        1.0   69250
          4        2.5   102950

Which of the following SAS statement(s) create(s) the report?

A.
id style;

B.
id style;
var style bedrooms baths price;

C.
id style;
var style bedrooms baths price;

D.
id style;
by style;
var style bedrooms baths price;

By admin | September 29, 2009

SAS Certified Base Programmer 123 Questions (92)

The following SAS program is submitted:

proc report data = sasuser.houses nowd headline headskip;
    column style price;
    where price <100000;
    <insert code here>
    title;
run;

Exhibit: output from the REPORT procedure.

Style     Price
RANCH     $64,000
SPLIT     $65,850
CONDO     $80,050
RANCH     $86,650
SPLIT     $94,450
SPLIT     $73,650
CONDO     $79,350
TWOSTORY  $55,850
RANCH     $89,100
TWOSTORY  $69,250
RANCH     $34,500

Assuming that the PRICE variable is numeric, which one of the following completes the program and produces the output displayed in the exhibit?

A.
define style / group 'Style';
define price / mean 'Price' format = dollar9.;

B.
define style / display 'Style';
define price / across 'Price' format = dollar9.;

C.
define style / display 'Style';
define price / sum 'Price' format = dollar9.;

D.
define style / order 'Style';
define price / mean 'Price' format = dollar9.;