SlideShare a Scribd company logo
1 of 3
Download to read offline
I need help with Applied Statistics and the SAS Programming Language
Solution
Introduction :
All SAS jobs are a sequence of SAS steps, which are
made up of instructions, which are called SAS
statements. There are only two kinds of SAS steps:
DATA steps are used to read, edit, and transform data
(raw data or SAS data files), to prepare SAS data sets,
PROC steps are ready-to-use procedures which
analyze or process SAS data sets. In general, data
must be in a SAS data file before they can be
processed by SAS procedures.
Without going into the details at this time, here is a
skeletal example of a SAS job:
DATA STUDENTS;
INPUT NAME $ 1-14 SEX $ 15
SECTION $ 17-19 GRADE;
DATALINES;
. . . data lines . . .
;
PROC SORT DATA=STUDENTS;
BY SECTION DESCENDING GRADE;
PROC PRINT DATA=STUDENTS;
BY SECTION;
RUN
There are two kinds of SAS data sets: SAS data files (or tables), and SAS data views. A SAS
data file contains: the descriptor portion, which provides SAS procedures and some DATA step
statements with descriptive information (data set attributes and variable attributes) about the data
, and the data portion, a rectangular structure containing the data values, with rows (customarily
called observations), and columns (customarily called variables); and which is passed to most
procedures, observation by observation. A SAS catalog is a type of SAS file which stores many
different types of information used by the SAS System. All SAS files reside in a SAS data
library. The SAS System processes the program in two steps: (1) it compiles the program, and
(2) it executes the program. When the program is compiled, a program data vector (PDV) is
constructed for each DATA step. It is an area of memory which includes all variables which are
referenced either explicitly or implicitly in the DATA step. At execution time, the PDV is the
location where the current working values are stored as they are processed by the DATA step.
Variables are added to the PDV sequentially as they are encountered during parsing and
interpretation of SAS source statements. Each step (DATA or PROC) is compiled and executed
separately, in sequence. And at execution time within each DATA step, each observation is
processed iteratively through all of the SAS programming statements of the DATA step. SAS
procedures (PROCs) are programs that are designed to perform specific data processing and
analysis tasks on SAS data sets. Base/SAS procedures fall into the following categories: SAS
Utilities -- APPEND, CATALOG, CIMPORT, COMPARE, CONTENTS, COPY, CPORT,
DATASETS, DBCSTAB, DISPLAY, EXPLODE, EXPORT, FORMAT, FSLIST, IMPORT,
OPTIONS, PMENU, PRINTTO, RANK, REGISTRY, SORT, SQL, STANDARD,
TRANSPOSE, TRANTAB; Descriptive Statistics -- CORR, FREQ, MEANS, SQL,
SUMMARY, TABULATE, UNIVARIATE; Reporting -- CALENDAR, CHART, FORMS,
MEANS, PLOT, PRINT, REPORT, SQL, SUMMARY, TABULATE, TIMEPLOT.
Creating SAS Data Files Since SAS procedures can operate only on SAS data sets, then the first
step in processing any raw data using SAS will be to transform them into a SAS data set.
Whenever the SAS System creates a SAS DATA file, it does the following: 1. it reads the DATA
statement, creates the structure of a SAS data set, and marks the statement as the place to begin
the processing of each line of data; 2. it uses the description of the data in the INPUT statement
to read the data line, and to produce an observation; 3. it uses the observation to execute any
other SAS statements that are in the DATA step; 4. it adds the observation to the data set being
created; and 5. it returns to the beginning of the DATA step for the processing of the next
observation. All SAS DATA step statements are executed once for each observation. All SAS
statements begin with an identifying keyword, and end with a semicolon. SAS statements are
freeformat. They can begin anywhere, and end anywhere. A single statement may continue over
several lines. Several statements may be on a single line. Blanks (as many as desired) are used to
separate fields. Other special characters also may be used to separate fields. The data portion of
a SAS data file is a collection of data values arranged in a rectangular table. The rows in the table
are called observations. The columns in the table are called variables. There are two kinds of
variables: character variables, and numeric variables. Each variable has a name. There are rules
for naming SAS data sets and variables: 1 to 32 characters in length (8 character maximum in
Version 6 and earlier versions), start with A-Z or _ (underscore), continue with letters, numbers,
or underscores. It is recommended that you choose meaningful names. Character data can
consist of up to 32,767 characters (max. of 200 characters in Version 6 and earlier versions).
Character values may include letters, numbers, blanks and special characters, although generally
you should not include any semicolons within the data. Numeric data values must be numbers,
and they may be preceded by a + or -. Unless the data are being read using a special SAS
informat, do not include commas or dollar signs in numeric data values. SAS assigns the value of
a decimal point (“.”) to missing numeric values, and a blank (“ ”) to missing character values.
You can enter these values into your data to indicate missing values. Every SAS data set has a
name and is physically stored on some type of media (disk, tape, etc.). In simple jobs, the SAS
data sets are stored on temporary space, but they can be stored “permanently”. A temporary SAS
data set exists only for the duration of the current SAS job, or interactive SAS session. A
permanent SAS data set exists after the end of the current SAS job or interactive SAS session.
Both types of SAS data sets have two-level names, of the form libref.data-set-name, where libref
is a reference to the name of a SAS data library (a collection of SAS files). With temporary
SAS data sets, the SAS System automatically assigns the libref WORK and you specify the data
set name. When you create a permanent SAS data set, you must specify both the libref and the
data set name. The SAS System does not assign the libref for you. Although there are other
methods for certain operating environments, the LIBNAME statement is the most universal
method of assigning a libref. The general form is LIBNAME libref ‘SAS-data-library’; Here is
an example of a LIBNAME statement in the Windows environment: LIBNAME mylib1
‘C:mySASlib’;

More Related Content

Similar to I need help with Applied Statistics and the SAS Programming Language.pdf

Introduction to SAS
Introduction to SASIntroduction to SAS
Introduction to SASImam Jaffer
 
8323 Stats - Lesson 1 - 03 Introduction To Sas 2008
8323 Stats - Lesson 1 - 03 Introduction To Sas 20088323 Stats - Lesson 1 - 03 Introduction To Sas 2008
8323 Stats - Lesson 1 - 03 Introduction To Sas 2008untellectualism
 
BAS 150 Lesson 3 Lecture
BAS 150 Lesson 3 LectureBAS 150 Lesson 3 Lecture
BAS 150 Lesson 3 LectureWake Tech BAS
 
Introducción al Software Analítico SAS
Introducción al Software Analítico SASIntroducción al Software Analítico SAS
Introducción al Software Analítico SASJorge Rodríguez M.
 
Sas-training-in-mumbai
Sas-training-in-mumbaiSas-training-in-mumbai
Sas-training-in-mumbaiUnmesh Baile
 
Basics Of SAS Programming Language
Basics Of SAS Programming LanguageBasics Of SAS Programming Language
Basics Of SAS Programming Languageguest2160992
 
Analytics with SAS
Analytics with SASAnalytics with SAS
Analytics with SASEdureka!
 
Introduction to sas
Introduction to sasIntroduction to sas
Introduction to sasAjay Ohri
 
Sas Enterprise Guide A Revolutionary Tool
Sas Enterprise Guide A Revolutionary ToolSas Enterprise Guide A Revolutionary Tool
Sas Enterprise Guide A Revolutionary Toolsysseminar
 
Sas short course_presentation_11-4-09
Sas short course_presentation_11-4-09Sas short course_presentation_11-4-09
Sas short course_presentation_11-4-09Prashant Ph
 
Sas short course_presentation_11-4-09
Sas short course_presentation_11-4-09Sas short course_presentation_11-4-09
Sas short course_presentation_11-4-09Prashant Ph
 
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...Edureka!
 

Similar to I need help with Applied Statistics and the SAS Programming Language.pdf (20)

Introduction to SAS
Introduction to SASIntroduction to SAS
Introduction to SAS
 
8323 Stats - Lesson 1 - 03 Introduction To Sas 2008
8323 Stats - Lesson 1 - 03 Introduction To Sas 20088323 Stats - Lesson 1 - 03 Introduction To Sas 2008
8323 Stats - Lesson 1 - 03 Introduction To Sas 2008
 
BAS 150 Lesson 3 Lecture
BAS 150 Lesson 3 LectureBAS 150 Lesson 3 Lecture
BAS 150 Lesson 3 Lecture
 
Introducción al Software Analítico SAS
Introducción al Software Analítico SASIntroducción al Software Analítico SAS
Introducción al Software Analítico SAS
 
Sas-training-in-mumbai
Sas-training-in-mumbaiSas-training-in-mumbai
Sas-training-in-mumbai
 
SAS Online Training by Real Time Working Professionals in USA,UK,India,Middle...
SAS Online Training by Real Time Working Professionals in USA,UK,India,Middle...SAS Online Training by Real Time Working Professionals in USA,UK,India,Middle...
SAS Online Training by Real Time Working Professionals in USA,UK,India,Middle...
 
Basics Of SAS Programming Language
Basics Of SAS Programming LanguageBasics Of SAS Programming Language
Basics Of SAS Programming Language
 
Analytics with SAS
Analytics with SASAnalytics with SAS
Analytics with SAS
 
SAS - overview of SAS
SAS - overview of SASSAS - overview of SAS
SAS - overview of SAS
 
Introduction to sas
Introduction to sasIntroduction to sas
Introduction to sas
 
Sas Enterprise Guide A Revolutionary Tool
Sas Enterprise Guide A Revolutionary ToolSas Enterprise Guide A Revolutionary Tool
Sas Enterprise Guide A Revolutionary Tool
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
 
Sas
SasSas
Sas
 
Sas short course_presentation_11-4-09
Sas short course_presentation_11-4-09Sas short course_presentation_11-4-09
Sas short course_presentation_11-4-09
 
Sas short course_presentation_11-4-09
Sas short course_presentation_11-4-09Sas short course_presentation_11-4-09
Sas short course_presentation_11-4-09
 
Spss
SpssSpss
Spss
 
Sas
Sas Sas
Sas
 
Uses of SPSS and Excel to analyze data
Uses of SPSS and Excel   to analyze dataUses of SPSS and Excel   to analyze data
Uses of SPSS and Excel to analyze data
 
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...
SAS Programming For Beginners | SAS Programming Tutorial | SAS Tutorial | SAS...
 
Sas base programmer
Sas base programmerSas base programmer
Sas base programmer
 

More from Madansilks

i need help with fractions like adding and subtracting fractions wit.pdf
i need help with fractions like adding and subtracting fractions wit.pdfi need help with fractions like adding and subtracting fractions wit.pdf
i need help with fractions like adding and subtracting fractions wit.pdfMadansilks
 
i need help with dividing fractionsSolution .pdf
i need help with dividing fractionsSolution                     .pdfi need help with dividing fractionsSolution                     .pdf
i need help with dividing fractionsSolution .pdfMadansilks
 
I need help with Architecture Analysis Writing Assignment. It should.pdf
I need help with Architecture Analysis Writing Assignment. It should.pdfI need help with Architecture Analysis Writing Assignment. It should.pdf
I need help with Architecture Analysis Writing Assignment. It should.pdfMadansilks
 
i need help using please excuse my dear aunt sally. Can you give me .pdf
i need help using please excuse my dear aunt sally. Can you give me .pdfi need help using please excuse my dear aunt sally. Can you give me .pdf
i need help using please excuse my dear aunt sally. Can you give me .pdfMadansilks
 
I need help on the Gerald and Moira Ryan 2014 tax return case.So.pdf
I need help on the Gerald and Moira Ryan 2014 tax return case.So.pdfI need help on the Gerald and Moira Ryan 2014 tax return case.So.pdf
I need help on the Gerald and Moira Ryan 2014 tax return case.So.pdfMadansilks
 
I need help figuring this one out please parts AHow many adults .pdf
I need help figuring this one out please parts AHow many adults .pdfI need help figuring this one out please parts AHow many adults .pdf
I need help figuring this one out please parts AHow many adults .pdfMadansilks
 
I need a copy of the accounting cycleSolutionAccounting Cycle .pdf
I need a copy of the accounting cycleSolutionAccounting Cycle .pdfI need a copy of the accounting cycleSolutionAccounting Cycle .pdf
I need a copy of the accounting cycleSolutionAccounting Cycle .pdfMadansilks
 
I must have the formula calculation view from the spreadsheet to s.pdf
I must have the formula  calculation view from the spreadsheet to s.pdfI must have the formula  calculation view from the spreadsheet to s.pdf
I must have the formula calculation view from the spreadsheet to s.pdfMadansilks
 
I managed to do this in terms of polar coordinates. How would one so.pdf
I managed to do this in terms of polar coordinates. How would one so.pdfI managed to do this in terms of polar coordinates. How would one so.pdf
I managed to do this in terms of polar coordinates. How would one so.pdfMadansilks
 
I know that real numbers consist of the natural or counting numbers,.pdf
I know that real numbers consist of the natural or counting numbers,.pdfI know that real numbers consist of the natural or counting numbers,.pdf
I know that real numbers consist of the natural or counting numbers,.pdfMadansilks
 
I know how to calculate Dn... 7.758The answer is supposed to be Aj.pdf
I know how to calculate Dn... 7.758The answer is supposed to be Aj.pdfI know how to calculate Dn... 7.758The answer is supposed to be Aj.pdf
I know how to calculate Dn... 7.758The answer is supposed to be Aj.pdfMadansilks
 
I just need problem 3Find the the sum of the series12^4 + 14.pdf
I just need problem 3Find the the sum of the series12^4 + 14.pdfI just need problem 3Find the the sum of the series12^4 + 14.pdf
I just need problem 3Find the the sum of the series12^4 + 14.pdfMadansilks
 
I hope i did all of that correctly.Can someone check my math o.pdf
I hope i did all of that correctly.Can someone check my math o.pdfI hope i did all of that correctly.Can someone check my math o.pdf
I hope i did all of that correctly.Can someone check my math o.pdfMadansilks
 
I hope someone can help me , I need to write a ten page paper on Pro.pdf
I hope someone can help me , I need to write a ten page paper on Pro.pdfI hope someone can help me , I need to write a ten page paper on Pro.pdf
I hope someone can help me , I need to write a ten page paper on Pro.pdfMadansilks
 
I have to do a project..no one stops at the sign in front of my hous.pdf
I have to do a project..no one stops at the sign in front of my hous.pdfI have to do a project..no one stops at the sign in front of my hous.pdf
I have to do a project..no one stops at the sign in front of my hous.pdfMadansilks
 
I have only 1 attempt. Please make sure answers are correct.Answ.pdf
I have only 1 attempt. Please make sure answers are correct.Answ.pdfI have only 1 attempt. Please make sure answers are correct.Answ.pdf
I have only 1 attempt. Please make sure answers are correct.Answ.pdfMadansilks
 
I have no idea how to start this problem or how to format in Excel...pdf
I have no idea how to start this problem or how to format in Excel...pdfI have no idea how to start this problem or how to format in Excel...pdf
I have no idea how to start this problem or how to format in Excel...pdfMadansilks
 
I have the book Business Driven Information Systems, 4th edition. I .pdf
I have the book Business Driven Information Systems, 4th edition. I .pdfI have the book Business Driven Information Systems, 4th edition. I .pdf
I have the book Business Driven Information Systems, 4th edition. I .pdfMadansilks
 
I have heard multiple times that a consistent definition of liquidit.pdf
I have heard multiple times that a consistent definition of liquidit.pdfI have heard multiple times that a consistent definition of liquidit.pdf
I have heard multiple times that a consistent definition of liquidit.pdfMadansilks
 
I have been assigned to take the data and arrange it in the order I .pdf
I have been assigned to take the data and arrange it in the order I .pdfI have been assigned to take the data and arrange it in the order I .pdf
I have been assigned to take the data and arrange it in the order I .pdfMadansilks
 

More from Madansilks (20)

i need help with fractions like adding and subtracting fractions wit.pdf
i need help with fractions like adding and subtracting fractions wit.pdfi need help with fractions like adding and subtracting fractions wit.pdf
i need help with fractions like adding and subtracting fractions wit.pdf
 
i need help with dividing fractionsSolution .pdf
i need help with dividing fractionsSolution                     .pdfi need help with dividing fractionsSolution                     .pdf
i need help with dividing fractionsSolution .pdf
 
I need help with Architecture Analysis Writing Assignment. It should.pdf
I need help with Architecture Analysis Writing Assignment. It should.pdfI need help with Architecture Analysis Writing Assignment. It should.pdf
I need help with Architecture Analysis Writing Assignment. It should.pdf
 
i need help using please excuse my dear aunt sally. Can you give me .pdf
i need help using please excuse my dear aunt sally. Can you give me .pdfi need help using please excuse my dear aunt sally. Can you give me .pdf
i need help using please excuse my dear aunt sally. Can you give me .pdf
 
I need help on the Gerald and Moira Ryan 2014 tax return case.So.pdf
I need help on the Gerald and Moira Ryan 2014 tax return case.So.pdfI need help on the Gerald and Moira Ryan 2014 tax return case.So.pdf
I need help on the Gerald and Moira Ryan 2014 tax return case.So.pdf
 
I need help figuring this one out please parts AHow many adults .pdf
I need help figuring this one out please parts AHow many adults .pdfI need help figuring this one out please parts AHow many adults .pdf
I need help figuring this one out please parts AHow many adults .pdf
 
I need a copy of the accounting cycleSolutionAccounting Cycle .pdf
I need a copy of the accounting cycleSolutionAccounting Cycle .pdfI need a copy of the accounting cycleSolutionAccounting Cycle .pdf
I need a copy of the accounting cycleSolutionAccounting Cycle .pdf
 
I must have the formula calculation view from the spreadsheet to s.pdf
I must have the formula  calculation view from the spreadsheet to s.pdfI must have the formula  calculation view from the spreadsheet to s.pdf
I must have the formula calculation view from the spreadsheet to s.pdf
 
I managed to do this in terms of polar coordinates. How would one so.pdf
I managed to do this in terms of polar coordinates. How would one so.pdfI managed to do this in terms of polar coordinates. How would one so.pdf
I managed to do this in terms of polar coordinates. How would one so.pdf
 
I know that real numbers consist of the natural or counting numbers,.pdf
I know that real numbers consist of the natural or counting numbers,.pdfI know that real numbers consist of the natural or counting numbers,.pdf
I know that real numbers consist of the natural or counting numbers,.pdf
 
I know how to calculate Dn... 7.758The answer is supposed to be Aj.pdf
I know how to calculate Dn... 7.758The answer is supposed to be Aj.pdfI know how to calculate Dn... 7.758The answer is supposed to be Aj.pdf
I know how to calculate Dn... 7.758The answer is supposed to be Aj.pdf
 
I just need problem 3Find the the sum of the series12^4 + 14.pdf
I just need problem 3Find the the sum of the series12^4 + 14.pdfI just need problem 3Find the the sum of the series12^4 + 14.pdf
I just need problem 3Find the the sum of the series12^4 + 14.pdf
 
I hope i did all of that correctly.Can someone check my math o.pdf
I hope i did all of that correctly.Can someone check my math o.pdfI hope i did all of that correctly.Can someone check my math o.pdf
I hope i did all of that correctly.Can someone check my math o.pdf
 
I hope someone can help me , I need to write a ten page paper on Pro.pdf
I hope someone can help me , I need to write a ten page paper on Pro.pdfI hope someone can help me , I need to write a ten page paper on Pro.pdf
I hope someone can help me , I need to write a ten page paper on Pro.pdf
 
I have to do a project..no one stops at the sign in front of my hous.pdf
I have to do a project..no one stops at the sign in front of my hous.pdfI have to do a project..no one stops at the sign in front of my hous.pdf
I have to do a project..no one stops at the sign in front of my hous.pdf
 
I have only 1 attempt. Please make sure answers are correct.Answ.pdf
I have only 1 attempt. Please make sure answers are correct.Answ.pdfI have only 1 attempt. Please make sure answers are correct.Answ.pdf
I have only 1 attempt. Please make sure answers are correct.Answ.pdf
 
I have no idea how to start this problem or how to format in Excel...pdf
I have no idea how to start this problem or how to format in Excel...pdfI have no idea how to start this problem or how to format in Excel...pdf
I have no idea how to start this problem or how to format in Excel...pdf
 
I have the book Business Driven Information Systems, 4th edition. I .pdf
I have the book Business Driven Information Systems, 4th edition. I .pdfI have the book Business Driven Information Systems, 4th edition. I .pdf
I have the book Business Driven Information Systems, 4th edition. I .pdf
 
I have heard multiple times that a consistent definition of liquidit.pdf
I have heard multiple times that a consistent definition of liquidit.pdfI have heard multiple times that a consistent definition of liquidit.pdf
I have heard multiple times that a consistent definition of liquidit.pdf
 
I have been assigned to take the data and arrange it in the order I .pdf
I have been assigned to take the data and arrange it in the order I .pdfI have been assigned to take the data and arrange it in the order I .pdf
I have been assigned to take the data and arrange it in the order I .pdf
 

Recently uploaded

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 

Recently uploaded (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 

I need help with Applied Statistics and the SAS Programming Language.pdf

  • 1. I need help with Applied Statistics and the SAS Programming Language Solution Introduction : All SAS jobs are a sequence of SAS steps, which are made up of instructions, which are called SAS statements. There are only two kinds of SAS steps: DATA steps are used to read, edit, and transform data (raw data or SAS data files), to prepare SAS data sets, PROC steps are ready-to-use procedures which analyze or process SAS data sets. In general, data must be in a SAS data file before they can be processed by SAS procedures. Without going into the details at this time, here is a skeletal example of a SAS job: DATA STUDENTS; INPUT NAME $ 1-14 SEX $ 15 SECTION $ 17-19 GRADE; DATALINES; . . . data lines . . . ; PROC SORT DATA=STUDENTS; BY SECTION DESCENDING GRADE; PROC PRINT DATA=STUDENTS; BY SECTION; RUN There are two kinds of SAS data sets: SAS data files (or tables), and SAS data views. A SAS data file contains: the descriptor portion, which provides SAS procedures and some DATA step statements with descriptive information (data set attributes and variable attributes) about the data , and the data portion, a rectangular structure containing the data values, with rows (customarily called observations), and columns (customarily called variables); and which is passed to most procedures, observation by observation. A SAS catalog is a type of SAS file which stores many different types of information used by the SAS System. All SAS files reside in a SAS data library. The SAS System processes the program in two steps: (1) it compiles the program, and
  • 2. (2) it executes the program. When the program is compiled, a program data vector (PDV) is constructed for each DATA step. It is an area of memory which includes all variables which are referenced either explicitly or implicitly in the DATA step. At execution time, the PDV is the location where the current working values are stored as they are processed by the DATA step. Variables are added to the PDV sequentially as they are encountered during parsing and interpretation of SAS source statements. Each step (DATA or PROC) is compiled and executed separately, in sequence. And at execution time within each DATA step, each observation is processed iteratively through all of the SAS programming statements of the DATA step. SAS procedures (PROCs) are programs that are designed to perform specific data processing and analysis tasks on SAS data sets. Base/SAS procedures fall into the following categories: SAS Utilities -- APPEND, CATALOG, CIMPORT, COMPARE, CONTENTS, COPY, CPORT, DATASETS, DBCSTAB, DISPLAY, EXPLODE, EXPORT, FORMAT, FSLIST, IMPORT, OPTIONS, PMENU, PRINTTO, RANK, REGISTRY, SORT, SQL, STANDARD, TRANSPOSE, TRANTAB; Descriptive Statistics -- CORR, FREQ, MEANS, SQL, SUMMARY, TABULATE, UNIVARIATE; Reporting -- CALENDAR, CHART, FORMS, MEANS, PLOT, PRINT, REPORT, SQL, SUMMARY, TABULATE, TIMEPLOT. Creating SAS Data Files Since SAS procedures can operate only on SAS data sets, then the first step in processing any raw data using SAS will be to transform them into a SAS data set. Whenever the SAS System creates a SAS DATA file, it does the following: 1. it reads the DATA statement, creates the structure of a SAS data set, and marks the statement as the place to begin the processing of each line of data; 2. it uses the description of the data in the INPUT statement to read the data line, and to produce an observation; 3. it uses the observation to execute any other SAS statements that are in the DATA step; 4. it adds the observation to the data set being created; and 5. it returns to the beginning of the DATA step for the processing of the next observation. All SAS DATA step statements are executed once for each observation. All SAS statements begin with an identifying keyword, and end with a semicolon. SAS statements are freeformat. They can begin anywhere, and end anywhere. A single statement may continue over several lines. Several statements may be on a single line. Blanks (as many as desired) are used to separate fields. Other special characters also may be used to separate fields. The data portion of a SAS data file is a collection of data values arranged in a rectangular table. The rows in the table are called observations. The columns in the table are called variables. There are two kinds of variables: character variables, and numeric variables. Each variable has a name. There are rules for naming SAS data sets and variables: 1 to 32 characters in length (8 character maximum in Version 6 and earlier versions), start with A-Z or _ (underscore), continue with letters, numbers, or underscores. It is recommended that you choose meaningful names. Character data can consist of up to 32,767 characters (max. of 200 characters in Version 6 and earlier versions).
  • 3. Character values may include letters, numbers, blanks and special characters, although generally you should not include any semicolons within the data. Numeric data values must be numbers, and they may be preceded by a + or -. Unless the data are being read using a special SAS informat, do not include commas or dollar signs in numeric data values. SAS assigns the value of a decimal point (“.”) to missing numeric values, and a blank (“ ”) to missing character values. You can enter these values into your data to indicate missing values. Every SAS data set has a name and is physically stored on some type of media (disk, tape, etc.). In simple jobs, the SAS data sets are stored on temporary space, but they can be stored “permanently”. A temporary SAS data set exists only for the duration of the current SAS job, or interactive SAS session. A permanent SAS data set exists after the end of the current SAS job or interactive SAS session. Both types of SAS data sets have two-level names, of the form libref.data-set-name, where libref is a reference to the name of a SAS data library (a collection of SAS files). With temporary SAS data sets, the SAS System automatically assigns the libref WORK and you specify the data set name. When you create a permanent SAS data set, you must specify both the libref and the data set name. The SAS System does not assign the libref for you. Although there are other methods for certain operating environments, the LIBNAME statement is the most universal method of assigning a libref. The general form is LIBNAME libref ‘SAS-data-library’; Here is an example of a LIBNAME statement in the Windows environment: LIBNAME mylib1 ‘C:mySASlib’;