본문 바로가기

SAS/Chapter Review Quiz

Chapter 15. Producing Descriptive Statistics

Q. The default statistics produced by the MEAN procedure are n-count, mean,minimum,maximun, and which one if the following statistics:     (standard deviation)

 

  • By default, the MEANS procedure produces the n, mean, minimum, maximum, and standard deviation.
  1. n
  2. mean
  3. minimum
  4. maximum
  5. standard deviation

 

 

 

 

Q. Which statement limits a PROC MEANS analysis to the variables Boarded, Transfer, and Deplane?

- PROC MEANS : VAR statement -

  • var  boarded  transfer   deplane ;

 

  • To specify the variables that PROC MEANS analyzes, add a VAR statement and list the variable names.
  • PROC MEANS 분석에서 분석하고자 하는 변수를 지정할 때는 VAR statement 를 사용한다.

 

[ 틀린 보기 ]

  • by   boarded  transfer   deplane ;
  • class  boarded  transfer   deplane ;
  • output  boarded  transfer   deplane ;

 

 

 

 

 

Q. The data set Cert.Health includes the following numeric variables. Which is a poop candidate for PROC MEANS analysis?   (IDnum)

- PROC MEANS -

  • IDnum   (poor candidate)
  • Age   
  • Height
  • Weight

 

 

 

 

 

Q. Which of the following statements is true regarding BY-group processing?

- BY-group processing 과 CLASS processing 의 비교 -

  • BY variables must be either indexed or sorted.  ( O )
  • Unlike CLASS processing BY-group processing requires that your data alread be indexed or sorted in the order of the BY variables.
  • you might need to run SORT procedure before using PROC MENAS with a BY group.

- CLASS processing 과 달리, BY-group processing 은 데이터가 사전에 정렬되어 있어야 한다 !

 

 

[ 틀린 보기 ]

  • Summary statistics are computed for BY variables.   ( X )
  • BY-group processing is preferred when you are categorizing data that contains few variables.    ( X )
  • BY-group processing overwrites your data set with the newly grouped observations.    ( X )

 

 

 

 

 

Q. Which group processing statement produced the PROC MEANS output shown below?

- BY-group processing 과 CLASS processing 의 비교 -

a single large table

 

  • class survived  sex
  • A CLASS statement procedure a single large table, whereas BY-group processing creates a series of small tables.
  • The order of the variables in the CLASS statement determines their order in the ouput table.

 

 

★ PROC MEANS 에서  BY statement 와 CLASS statement 의 차이점 ★

  • BY statement : a series of small tables
  • CLASS statement : a single large table

→ 한개의 table 이면 CLASS statement 를 사용한 것, 변수마다의 tables 이면 BY statement 를 사용한 것 !!!

 

 

 

 

 

 

Q. Which program can be used to create the following output?

- PROC MEANS : CLASS statement -

 

        proc means data=cert.diabetes ;

            var age    height    weight ;

            class sex ;

            output out = work.sum_gender

                mean =  AvgAge    AvgHeight    AvgWeight ;

        run ;

 

 

  • You can use PROC MEANS to create the table.
  • The MEANS procedure provides data summarization tools to compute descriptive statistics for the variable Age, Height, and Weight fopr each Sex group.

 

[ 틀린 보기 ]

a.

        proc freq data=cert.diabetes ;

           tables height weight sex ;

        run ;

 

b.

        proc means data=cert.diabetes noprint ;

             var age  height  weight ;

             class sex ;

             output out=work.sum_gender

                mean  AvgAge    AvgHeight    AvgWeight ;

        run;

 

 

 

 

Q. By default, PROC FREQ creates a table of frequencies and percentages for which data set variables?

- PROC FREQ - 

  • Both charater and numeric variables.
  • By default, PROC FREQ creates a table for all variables in a data set.
  • PROC FREQ 는 기본값으로 모든 변수에 대해 빈도 table 을 만들 수 있다. (숫자 + 문자)

 

 

 

 

Q. Frequency distributions (도수 분포)  work best with variables that contain which type of vatriables?   (Categorical values)

- PROC FREQ - 

  • Both continuous values and unique values can result in lengthy , meaningless tables.
  • Frequency distributions work best with categorical values.

 

[ 틀린 보기 ]

  • numeric values
  • continuous values
  • unique valeus

 

 

Q. Which PROC FREQ step produced this two-way table?

- two-way table -

         proc freq data=cert.diabetes ;

                tables weight * height ;            -------------→ TABLES statement

                format weight wtfmt.  height htfmt. ;

         run ;

 

 

  • An asterisk is used to join the variables in a two-way TABLES statement.
  • The first variable forms the table rows.
  • The second variable forms the table columns.

 

  • two-way table 을 만들때는 * (asterisk) 로 변수를 연결한다 !
  • TABLES statement 의 첫번째 변수는 table 의 행, 두번째 변수는 table의 열로 지정된다.

 

 

 

 

 

Q. Which PROC FREQ step produced this table?

         proc freq data=cert.diabetes;

             tables sex*weight / nofreq norow nocol ;

             format weight wtfmt. ;

         run ;

 

 

 

  • An asterisk is used to join the variables in cresstabulation tables.
  • The only results shown in this table are cell percentages.
  • The NOFREQ option suppresses cell frequencies, the NOROW option supresses row percentages, and NOCOL option supresses column percentages.
  • NOFREQ option : cell frequencies 출력 X
  • NOROW option : row frequencies 출력 X
  • NOCOL option : col frequencies 출력 X

 

'SAS > Chapter Review Quiz' 카테고리의 다른 글

Chapter 2. Accessing Data  (0) 2023.01.03
Chapter 1. SAS Programs  (0) 2023.01.03
Chapter 13. Data Transformations  (0) 2023.01.03
Chapter 8. By-Group Processing  (0) 2022.12.12