{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSULB_STAT475_handout4

CSULB_STAT475_handout4 - STAT 475 Chapters 7 17 SAS...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
STAT 475 Chapters 7, 17 SAS INFORMATS AND FORMATS SAS INFORMATS Informats are used to read data from external files, assigning permanent formats to variables. Typically, SAS informats are grouped into three categories: numeric, character, and date/time. For now, we study only numeric and character informats. The syntax of informats is as follows: Numeric variable INFORMATw.d Character variable $INFORMATw. The dollar sign indicates that it is a character type informat. INFORMAT refers to informat name (optional). The w refers to the width (the number of columns) of the variable (called a field width ). The d is used for numeric type data to specifiy the number of digits to the right of the decimal place. Informats must contain a period (called a period delimiter ) to differentiate informats from variable names. SAS provides a large number of informats. A complete list may be found in SAS documentation. Some example of informats are Numeric variable w.d COMMAw.d PERCENTw.d Character variable $w. $CHARw. The numeric informat COMMAw.d instructs SAS to treat the variable as numeric and strip the values from all comma separators (and dollar signs, if there are any). 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
The numeric informat PERCENTw.d instructs SAS to treat the variable with a percent sign (%) at the end as numeric and divide it by 100. The character informat $CHARw. instructs SAS to treat the variable as character and to store the variable with leading blanks, if they exist. Example. Suppose the following data are stored in file ‘H:\bankdata.dat’.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern