{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSULB_STAT475_handout15

CSULB_STAT475_handout15 - STAT 475 Chapter 14 TRANSFORMING...

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

View Full Document Right Arrow Icon
STAT 475 Chapter 14 TRANSFORMING DATA WITH SAS FUNCTIONS SAS FUNCTIONS THAT COMPUTE DESCRIPTIVE STATISTICS Function Syntax Computes for non- missing values SUM MEAN MIN MAX VAR STD sum( argument_1,…,argument_n ) mean( argument_1,…,argument_n ) min( argument_1,…,argument_n ) max( argument_1,…,argument_n ) var( argument_1,…,argument_n ) std( argument_1,…,argument_n ) sum average minimum value maximum value variance standard deviation Note that arguments must be separated by commas: sum(x, y, z). If arguments differ only in ending numbers, then they may be separated by a hyphen. The word OF must precede the list: sum(of x1-x3). If OF is omitted, then sum(x1-x3) computes x1 minus x3 . Example. The following data set contains student id number and scores on quizzes 1 through 5. For each student, the average, minimum, maximum, and standard deviation of scores are computed. data quizzes; input id$ quiz1-quiz5; avg_quiz=mean(quiz1, quiz2, quiz3, quiz4, quiz5); min_quiz=min(of quiz1-quiz5); max_quiz=max(of quiz1-quiz5); std_quiz=std (of quiz1-quiz5); cards; 0495 94 97 95 94 100 8612 89 92 82 97 100 6236 94 89 85 91 94 ; proc print noobs; run; The output is id quiz1 quiz2 quiz3 quiz4 quiz5 avg_quiz min_quiz max_quiz std_quiz 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
495 94 97 95 94 100 96.0 94 100 2.54951 8612 89 92 82 97 100 92.0 82 100 7.03562 6236 94 89 85 91 94 90.6 85 94 3.78153 MANIPULATING SAS DATE VALUES WITH FUNCTIONS
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