Sas Programming: Analytical

1y ago
4 Views
1 Downloads
1.45 MB
70 Pages
Last View : 24d ago
Last Download : 3m ago
Upload by : Raelyn Goode
Transcription

SAS PROGRAMMING: ANALYTICALEng. Mohammad KHALAFMobile: 00962-79-5880413Email: khalaf30@gmail.comWebpage: www.statanalysis.weebly.com

TABLE OF CONTENTSTable of Contents . 2Graphics . 3Univariate . 6Correlation . 13Kernel Density Estimate . 15T-test . 15Analysis of each variable separately . 18T-test . 29One sample t test . 29Paired t-test . 30Correlation Test . 31Independent sample t-test . 32ANOVA . 33Regression analysis . 34ODS in SAS . 35Appendices . 37Questionnaire . 38SAS t-test Commands . 41SAS Simple Linear Regression Example . 59Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 2

GRAPHICSTo produce simple scatterplot of two variables we use proc gplot as follow:data graph;input x y;datalines;20 1015 235 14;run;proc print data graph;run;proc gplot;plot y * x;run;Output of analysis partGraph output which is displayed on graph output windows as follow:To add line between the different points we use the commandsymbol1 i join;proc gplot;plot y * x;run;Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 3

where i indicates (interpolation)More additions to graph:data graph;input x y;datalines;20 1015 235 14;run;proc print data graph;run;symbol 1 v none i join;symbol1 v square i join;symbol2 v circle i join;proc gplot;plot y * x;run;where v indicates valuedata graph;input x y sex;datalines;20 10 M15 23 FMohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 4

5 14 M;run;symbol1 v none i join c red;symbol2 v none i join c red;proc gplot;plot y * x sex;run;repeat asrun;symbol1 v diamond i join c red;symbol2 v none i join c red;proc gplot;plot y * x sex;run;Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 5

UNIVARIATEdata water;input flag 1 Town Mortal Hardness;datalines;Bath 1247 105*Birkenhead 1668 17Birmingham 1466 5*Blackburn 1800 14*Blackpool 1609 18*Bolton 1558 10*Bootle 1807 15Bournemouth 1299 78*Bradford 1637 10Brighton 1359 84Bristol 1392 73*Burnley 1755 12Cardiff 1519 21Coventry 1307 78Croydon 1254 96*Darlington 1491 20*Derby 1555 39*Doncaster 1428 39EastHam 1318 122Exeter 1260 21*Gateshead 1723 44*Grimsby 1379 94*Halifax 1742 8*Hudders.eld 1574 9*Hull 1569 91Ipswich 1096 138*Leeds 1591 16Leicester 1402 37*Liverpool 1772 15*Manchester 1828 8*Middlesbrough 1704 26*Newcastle 1702 44Newport 1581 14Northampton 1309 59Norwich 1259 133*Nottingham 1427 27*Oldham 1724 6Oxford 1175 107Plymouth 1486 5Portsmouth 1456 90*Preston 1696 6Reading 1236 101*Rochdale 1711 13*Rotherham 1444 14*StHelens 1591 49*Salford 1987 8*Shef.eld 1495 14Southampton 1369 68Southend 1257 50*Southport 1587 75*SouthShields 1713 71*Stockport 1557 13*Stoke 1640 57*Sunderland 1709 71Swansea 1625 13Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 6

*Wallasey 1625 20Walsall 1527 60WestBromwich 1627 53WestHam 1486 122Wolverhampton 1485 81*York 1378 71;run;proc print data water;run;proc univariate data water normal;var mortal hardness;histogram mortal hardness /normal;probplot mortal hardness;run;The meaning of some of the other statistics printed in these displays are as follows:AbbreviationMeaningUncorrected SSCorrected SSCoeff VariationStd Error MeanRangeInterquartile RangeStudent’s tPr t Sign TestPr M Signed RankPr S Shapiro-Wilk WKolmogorov-Smirnov DCramer-von Mises W-sqAnderson-Darling A-sqUncorrected sum of squares; simply the sum of squares of theobservationsCorrected sum of squares; simply the sum of squares of deviationsof the observations from the sample meanCoefficient of variation; the standard deviation divided by the meanand multiplied by 100Standard deviation divided by the square root of the number ofobservationsDifference between largest and smallest observation in the sampleDifference between the 25% and 75% quantiles (see values ofquantiles given later in display to confirm)Student’s t -test value for testing that the population mean is zeroProbability of a greater absolute value forNonparametric test statistic for testing whether the populationmedian is zeroApproximation to the probability of a greater absolute value for theSign test under the hypothesis that the population median is zeroNonparametric test statistic for testing whether the population meanis zeroApproximation to the probability of a greater absolute value for theSign Rank statistic under the hypothesis that the populationmean is zeroShapiro-Wilk statistic for assessing the normality of the data and thecorresponding P-value (Shapiro and Wilk [1965])Kolmogorov-Smirnov statistic for assessing the normality of thedata and the corresponding P-value (Fisher and Van Belle [1993])Cramer-von Mises statistic for assessing the normality of the dataand the associated P-value (Everitt [1998])Anderson-Darling statistic for assessing the normality of the dataand the associated P-value (Everitt [1998])Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 7

OUTPUTSMohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 8

Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 9

Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 10

Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 11

proc gplot;plot mortal*hardness;run;Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 12

CORRELATIONproc corr data water pearson spearman;var mortal hardness;by town;run;Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 13

Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 14

KERNEL DENSITY ESTIMATEproc kde data water out bivest;var mortal hardness;proc g3d data bivest;plot hardness*mortal density;run;where KDE (Kernel Density Estimate)T-TESTdata water;set water;lhardnes log(hardness);if hardness 100 then T 1;elseT 2;proc ttest;class T;var mortal hardness lhardnes;proc npar1way wilcoxon;class T;var hardness;run;Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 15

Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 16

Example for applicationThe questionnaire which is considered the source of this data is existed in appendices.The following data is part of real data collected through the questionnaire.data sasuser.book3;input 332322233122434343run;orproc import out sasuser.book3datafile "C:\Users\MohdKHALAF\Desktop\SAS Training\samples\book3.xls"DBMS Excel Replace;GETNAMES YES;Run;To see the file contents use the following procedure:proc contents data sasuser.book3;Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 17

run;The output will be as follow introducing complete information about the database:ANALYSIS OF EACH VARIABLE SEPARATELYTo analyze the previous data we need first to describe each of the demographicvariables alone. The second stage will describe the other questions through finding theproper analysis to figure out the trends of sample for each of these paragraphs. Tostart our analysis we find the frequencies and percentage for each demographicquestions, then find the distribution of different demographic on each other andtesting if that distribution is significant or not.Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 18

If the frequency will be done for all variables in database we use the followingcommand:proc freq data sasuser.book3;run;Output will be:But as the variables of the second part of the questionnaire can be analyzed other typeof tests and it is not sense to do frequency or any type of analysis for serial notvariable (ser). Then the frequencies will be made for p1 to p5 only using the followingprocedure:proc freq data sasuser.book3;tables p1 p2 p3 p4 p5;run;The output will be as follow:Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 19

Through the previous tables, it is possible to describe the first five demographicvariables separately.To make our output more readable, the variable labels and value labels should beadded. To add variable labels, the following program can be used:data sasuser.book3;set sasuser.book3;labelp1 " "الجنس p2 " "العمر p3 " "المستوى التعليمي p4 " "المستوى اإلداري p5 " "عدد سنوات الخبرة Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 20

run;proc contents data sasuser.book3;run;The output of the contents procedures will be as follow:The results for the analysis for the frequency for p1 and p2 will be as follow if usingthe procedure:proc freq data sasuser.book3;tables p1 p2;run;The results will be as follow showing the labels:To add value labels for variables, the procedure will be as follow:data sasuser.book3;set sasuser.book3;proc format;valuep1fvalue p2fvalue p3f1 " "ذكر 2 " ;"أنثى 1 " سنة 52 "أقل من 2 "25– 52 "اقل من 3 "35 -52 "اقل من 4 "45 -22 "أقل من 5 "55 ;"فأكثر 1 " "دبلوم متوسط فأقل Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 21

valuep4fvaluep5f2 " "بكالوريوس 3 " "دبلوم عالي 4 " "ماجستير 5 " ;"دكتوراه 1 " "إدارة عليا 2 " "إدارة وسطى 3 " ;"إدارة إشرافيه 1 " سنوات 2 "أقل من 2 "5 – سنوات 01 "أقل من 3 "10 – سنة 02 "أقل من 4 "15 ;"سنة فأكثر run;proc freq data sasuser.book3;formatp1 p1f.p2 p2f.p3 p3f.p4 p4f.p5 p5f.;tables p1 p2 p3 p4 p5;run;The output will be follow:Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 22

To have more information about the demographic features of the studied sample,crosstabualtion will make it possible to do so and use the following procedure:proc freq data sasuser.book3;proc format;valuep1f1 " "ذكر 2 " ;"أنثى value p2f1 " سنة 52 "أقل من 2 "25– 52 "اقل من 3 "35 -52 "اقل من 4 "45 -22 "أقل من 5 "55 ;"فأكثر value p3f1 " "دبلوم متوسط فأقل 2 " "بكالوريوس 3 " "دبلوم عالي 4 " "ماجستير 5 " ;"دكتوراه valuep4f1 " "إدارة عليا 2 " "إدارة وسطى 3 " ;"إدارة إشرافيه valuep5f1 " سنوات 2 "أقل من 2 "5 – سنوات 01 "أقل من 3 "10 – سنة 02 "أقل من 4 "15 ;"سنة فأكثر run;proc freq data sasuser.book3;formatp1 p1f.p2 p2f.p3 p3f.p4 p4f.p5 p5f.;tables p1*p2 p1*p3 p1*p4 p1*p5/chisqr;run;The output for this analysis is as follow:Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 23

To analyze the second part of the questionnaire, descriptive statistics will be usedconcentrating on the use of mean and standard deviation for the questions q1-q14; thefollowing procedure can be used:proc means data sasuser.book3;run;Which will give means for all database variables as follow:Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 24

As it is not since to include the first part that has been already analyzed, then thefollowing procedure will be followed to get the means for the second part only asfollow:proc means data sasuser.book3;var q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q13 q14 ;run;The output will be:If the output needs to be limited to mean or any other output the procedure will be asfollow:proc means N mean std data sasuser.book3;var q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q13 q14 ;run;Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 25

If it was recognized that the name of variable q14 was written wrongly to q14 . Thename change of variable q14 to q14 can be done using the following procedure:data sasuser.book4;set sasuser.book3;rename q14 q14;run;To read the output with much not necessary decimals makes dealing with outputdisturbing. To minimize the number of decimal to the number preferred, the statementcan be used (maxdec 2) and can be used with the procedure as follow:proc means N mean std maxdec 2 data sasuser.book4;var q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14;run;The output will be as follow:Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 26

To insure that the mean results are correct, the scale of agreements should be (5) forabsolutely agree and (1) for absolutely not agree. This indicates that the means are notcorrect for q1 to q14 as the codes given to the agreements are on the contrary order.To correct the codes, recode process should be done to change (5 to 1), (4 to 2), (3 to3), (2 to 4) and (1 to 5).data sasuser.book3;set sasuser.book3;qq1 6- q1;qq2 6- q2;qq3 6- q3;qq4 6- q4;qq5 6- q5;qq6 6- q6;qq7 6- q7;qq8 6- q8;qq9 6- q9;qq10 6- q10;qq11 6- q11;qq12 6- q12;qq13 6- q13;qq14 6- q14;run;proc freq data sasuser.book4;tables q1-q9;run;To have complete and comprehensive analysis, this requires the distribution of resultsin questions q1 to q14 by the demographic variables available. To do so, Theprocedure used is as follow:proc sort data sasuser.book4;by p1;run;proc means data sasuser.book4;var q1;by p1;run;The output for the distribution will be:Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 27

The previous analysis can be done for all variables q1-q14 in one step as follow:proc sort data sasuser.book4;by p1;run;proc means data sasuser.book4;var q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14;by p1;run;The output will be:Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 28

The same analysis will be conducted with p2 up to p3.T-TESTOne sample t testThere are three type of t-test than can be applied on the running example. The firsttype of t-test is one sample t-test.proc ttest h0 3 alpha 0.1 data sasuser.book4;var q1;run;The output will be:Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 29

The same test can be repeated for q2 to q14 to measure if there is significantdifferences from the hypothetical mean for the variables.proc ttest h0 3 alpha 0.1 data sasuser.book4;var q1-q14;run;Paired t-testThe second type of t-test that can be applied to the current questionnaire is the pairedt-test.proc ttest data sasuser.book4;paired q1*q4 q1*q2;run;Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 30

CORRELATION TESTTo figure out if two variables are correlation to each other or not correlation test isused. The procedure of correlation will be:proc corr data sasuser.book4;var q1 q2;run;The output will be:Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 31

The result shows that there is high correlation between the two variables whichmatches the paired sample t-test.Independent sample t-testThe third type of hypothesis testing concerning t-test is the independent sample ttest. This test includes two variables. The first variable should be categorical whilethe second variable should be continuous. So, the test can be done between the sex(p1) vs q1 to q14. The procedure applied will be as follow:proc ttest data sasuser.book4;class p1;var q1-q14;run;Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 32

ANOVATo test the effect of educational level, employee position and experience on theattitudes for the questions q1 to q14, the analysis of variance will be used. Theprocedure applied in the analysis of variance will be:proc anova data sasuser.book4;class p2;model q1 p2;run;To run the process correctly the tests in general are not hold for each question. A lookto the questionnaire in Appendix I shows that q1-q7 represent one field, while q8-q14represents another field in the survey. So, the mean for each field should be calculatedin new variable to be used to be tested by the demographic variables. The process canbe done as follow:data sasuser.book4;set sasuser.book4;q (q1 q2 q3 q4 q5 q6 q7)/7;run;and for the q8 to q14:data sasuser.book4;set sasuser.book4;qq (q8 q9 q10 q11 q12 q13)/6;run;Then the ANOVA analysis can be handled with q and qq with the demographicvariables.Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 33

REGRESSION ANALYSISIf the effect of q will be measured on qq, this effect can be measured using regressionanalysis as analysis tool. The q variable will be independent variable, while qq will bedependent variable in the regression analysis. The procedure is as follow:proc reg data sasuser.book4;model qq q;run;Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 34

ODS IN SASThe Output Delivery System (ODS) provides a way to manage SAS output. The SASoutput can be directed to be received by other software. It can be received in RichText Format, HTML, or other forms. The output can be read to other software usingthe following procedure:ODS RTF;proc means N mean std maxdec 2 data sasuser.book4;var q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q13 q14;run;ODS RTF Close;The output will be move to Microsoft office in Rich Text Format file. The output willas follow inside SAS:In Microsoft Office it looks like:Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 35

Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 36

APPENDICESMohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 37

Questionnaire السيد / السيدة بسم اهلل الرحمن الرحيم المحترم تحية طيبة وبعد ،،، استبانه تهدف إلى قياس أثر التدريب في تحسين أداء العاملين . تهدف الدراسة تقديم مقترحات لتحسين البرامج التدريبية التي تعتمدها مؤسستكم الموقرة لزيادة أدائها بما يخدم تحقيقها ألهدافكم . وأن حرصكم على تقديم البيانات والمعلوماات المطلوباة بدقاة وموياوعية سيسااهم وف ا فاي التوصل إلى نتائج أفيل ، وبالتالي المساعدة في التوصل إلى نتاائج أد وتقاديم توصايات ات فائدة أكبار . لا ا نر ، او ، التكارم بالت اير علاى فقارات افساتمارة المرفقاة ، وبماا يتناساب والبارامج التدريبية المطبقة في مركزكم . نر ، و العلم ، ب ن البيانات والمعلومات التاي ساتوفرونها لها ل الدراسااااة ستساتخدم فقاط أل ا ار البحث العلمي ، وستعامل بسرية تامة ، وسيتم تزويدكم بنتاائج الدراساة فاي حالاة افنتهااء منهاا إ ا ر بتم بافطالع عليها . اكرين لكم حسن تعاونكم ،،، page 38 Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.com

ال ، زء األول : الر ، اء ويع إ ارة ( )X في المكان المناسب . الخصائص ال خصية والوظيفية ال ، نس : ( - العمر : ( ( ) كر ( ) أقل من 52 سنة ) - 52 أقل من ( 22 ( ) –52 اقل من ( 52 ) 22 ف كثر . المستوى التعليمي : ( ( ) دبلوم متوسط ف قل ( ) ما ، ستير - المستوى اإلداري : ) إدارة عليا ( عدد سنوات الخبرة : ( ( page 39 ( ) أقل من 2 سنوات ) أنثى ( ) بكالوريوس ) دكتورال ( ) إدارة وسطى ( ) – 01 أقل من 02 سنة ( ) - 52 اقل من 52 ) دبلوم عالي ( ) إدارة إ رافيه ) – 2 أقل من 01 سنوات ) 02 سنة ف كثر Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.com

ال ، زء الثاني : ير ، ى ويع إ ارة ( ) x في المكان ال ي ترال مناسبا المتغيرات المستقلة (: التدريب) أوف : تحديد افحتيا ، ات التدريبية الفقرة أواف ب دة مواف ير مت كد ير مواف ير مواف ب دة -1 ساعد تحديد االحتياجات التدريبية بشكل فاعل في نجاح عملية التدريب -2 يتم توضيح األهداف الخاصة بالبرنامج التدريبي بشكل واضح ودقيق -3 يتم اختيار البرامج التدريبية وفق احتياجات العاملين والعمل -4 يتم تصميم البرامج التدريبية بمنهجية علمية -5 تحرص اإلدارة على التعرف على احتياجات الموظفين التدريبية لتحسين مستوى أدائهم -6 تحرص اإلدارة على تحديد مواطن ضعف األداء لدى العاملين -7 تبحث اإلدارة عن أسباب الخطأ في األداء وتعمل على التخلص منه ثانيا : كفاءة برامج التدريب -1 تُعد البرامج التدريبية المنفذة من افضل الوسائل لتحسين اداء العمل -2 ساهم التدريب في تخفيض االعباء المتعلقة بالوظيفة داخل القسم -3 ساهم توظيف الطرق العلمية المتطورة في زيادة كفاءة برامج التدريب -4 ساهمت البرامج التدريبية في اكتساب العاملين مهارات ومعارف تم تطبيقها في المؤسسة -5 ساعدت البرامج التدريبية في امتالك الموظف لروح المنافسة -6 تتيح البرامج التدريبية للعاملين فرصة الممارسة العملية -7 تسهم الشركة بإعداد برامج تدريبية لخلق كوادر متميزة page 40 Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.com

SAS t-test CommandsThis handout illustrates how to read in raw data to SAS, set up missing values and createnew variables using transformations and recodes. We illustrate independent samples t-tests,paired t-tests, and one-sample t-tests.Read in Raw DataIn the first data step, we read in the raw data using an infile and input statement. We don'tneed to tell SAS the column location of each variable, because there is at least one blankbetween variables, so we can use a free-format input statement where the variables aresimply listed in the order they appear in the raw data file./*Read in the raw data*/data owen;infile "owen.dat" ;input family child age sex race w rank income c height weight hemovit c vit a head cir fatfold b weight mot age b orderm heightf height ;run;Create a Permanent DatasetAfter reading in the raw data, we create a new permanent SAS dataset in which we set upmissing values and create new variables using recodes and transformations. Note in settingup the missing value codes, a dot (.) is used for the missing value code and no quotes areemployed, because all of these variables are numeric. Although we used two data steps inthis example, all of this code could have been accomplished in a single data step.libname b510 "c:\documents and settings\kwelch\desktop\b510";data b510.owen;set owen;if height 999 then height .;if weight 999 then weight .;Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 41

if vit a 99 then vit a .;if head cir 99 then head cir .;if fatfold 99 then fatfold .;if b weight 999 then b weight .;if mot age 99then mot age .;if b order 99 then b order .;if m height 999 then m height .;if f height 999 then f height .;bwt g b weight*10;if bwt g not . and bwt g 2500 then lowbwt 1;if bwt g 2500 then lowbwt 0;log fatfold log(fatfold);htdiff f height - m height;bmi weight /(height/100)**2;run;Basic Descriptive StatisticsIt is always good practice to check a dataset after you have created it. Proc Means is usefulfor numeric variables. Be especially attentive to the number of observations (N) and theminimum and maximum value for each variable. Check to see that they are reasonable./*Simple Descriptive Statistics on all Numeric Variables*/proc means data b510.owen;run;The MEANS ProcedureThe MEANS ProcedureMohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 42

VariableNMeanStd 0000002.0000000w rank10062.21272370.90244401.00000004.0000000income 46063621.15788506.200000024.1000000vit c10061.13021870.65991210.10000003.5000000vit a76336.03800798.895123715.000000078.0000000head ld9934.45629411.66831942.600000042.0000000b 0mot age98129.26605506.260302517.000000051.0000000b order9802.94795922.19395261.000000016.0000000m 0f 0bwt .10750510.309911501.0000000log -----------------------Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 43

Descriptives for Subgroups using a Class StatementA Class statement can be used with Proc Means to get descriptive statistics for subgroups ofcases. You don't have to sort the data when using a class statement.proc means data b510.owen;class sex;var bwt g bmi fatfoldlog fatfold;run;The MEANS ProcedureNSEXMinimumObsVariableLabelNMeanStd ----------------1514bwt OLDlog 470280.20764170.95551142.3223877bwt log ---------------------Descriptives for Subgroups using a By StatementA By statement is another way to get information for subgroups of cases. You need to sortthe data first when using a By statment. The By statement is more generally applicable thanthe Class statement and can be used with most SAS procedures (e.g. Proc Reg, Proc Freq). Toavoid too much output, use a By statement only for variables that have a limited number oflevels.Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 44

proc sort data b510.owen;by sex;run;proc means data b510.owen;by sex;var bwt g bmi fatfoldlog ------ SEX 1 ----------------------------------The MEANS ProcedureVariableLabelNMeanStd --bwt TFOLD10.2000000log ---------------------------------------------- SEX 2 eanStd --bwt 7156511.02479345440.00bmi24.4485835Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.compage 45

9675240.26432320.955511442.0000000log --BoxplotsBoxplots are a nice way to visualize data when you wish to compare the value of acontinuous variable for two or more groups. In SAS 9.2, you can use Proc Sgplot to getboxplots. Proc Boxplot can be used in earlier versions of SAS, and in SAS 9.2./*Boxplots*/proc sgplot data b510.owen;vbox bwt g / category sex;run;proc sgplot data b510.owen;vbox bmi / category sex;run;proc sgplot data b510.owen;vbox fatfold / category sex;run;proc sgplot data b510.owen;vbox log fatfold / category sex;run;The boxplots show the median, upper and lower quartiles, give an idea of skewness, andindicate outliers.Mohammad KHALAF- 00962-79-5880413-khalaf30@gmail.com- www.statanalysis.weebly.c

To produce simple scatterplot of two variables we use proc gplot as follow: data graph; input x y; datalines; 20 10 15 23 5 14 ; run; proc print data graph; run; proc gplot; plot y * x; run; Output of analysis part Graph output which is displayed on graph output windows as follow: To add line between the different points we use the command

Related Documents:

POStERallows manual ordering and automated re-ordering on re-execution pgm1.sas pgm2.sas pgm3.sas pgm4.sas pgm5.sas pgm6.sas pgm7.sas pgm8.sas pgm9.sas pgm10.sas pgm1.sas pgm2.sas pgm3.sas pgm4.sas pgm5.sas pgm6.sas pgm7.sas pgm8.sas pgm9.sas pgm10.sas 65 min 45 min 144% 100%

SAS OLAP Cubes SAS Add-In for Microsoft Office SAS Data Integration Studio SAS Enterprise Guide SAS Enterprise Miner SAS Forecast Studio SAS Information Map Studio SAS Management Console SAS Model Manager SAS OLAP Cube Studio SAS Workflow Studio JMP Other SAS analytics and solutions Third-party Data

Both SAS SUPER 100 and SAS SUPER 180 are identified by the “SAS SUPER” logo on the right side of the instrument. The SAS SUPER 180 air sampler is recognizable by the SAS SUPER 180 logo that appears on the display when the operator turns on the unit. Rev. 9 Pg. 7File Size: 1MBPage Count: 40Explore furtherOperating Instructions for the SAS Super 180www.usmslab.comOPERATING INSTRUCTIONS AND MAINTENANCE MANUALassetcloud.roccommerce.netAir samplers, SAS Super DUO 360 VWRuk.vwr.comMAS-100 NT Manual PDF Calibration Microsoft Windowswww.scribd.com“SAS SUPER 100/180”, “DUO SAS SUPER 360”, “SAS .archive-resources.coleparmer Recommended to you b

Both SAS SUPER 100 and SAS SUPER 180 are identified by the “SAS SUPER 100” logo on the right side of the instrument. International pbi S.p.AIn « Sas Super 100/180, Duo Sas 360, Sas Isolator » September 2006 Rev. 5 8 The SAS SUPER 180 air sampler is recognisable by the SAS SUPER 180 logo that appears on the display when the .File Size: 1019KB

Jan 17, 2018 · SAS is an extremely large and complex software program with many different components. We primarily use Base SAS, SAS/STAT, SAS/ACCESS, and maybe bits and pieces of other components such as SAS/IML. SAS University Edition and SAS OnDemand both use SAS Studio. SAS Studio is an interface to the SAS

SAS Stored Process. A SAS Stored Process is merely a SAS program that is registered in the SAS Metadata. SAS Stored Processes can be run from many other SAS BI applications such as the SAS Add-in for Microsoft Office, SAS Information Delivery Portal, SAS Web

Jan 01, 2020 · SAS Programming SAS (Statistical Analysis System). SAS is a business application software which is used for DBMS and reporting, visualization and data mining purpose. To begin with sas we must start with sas data manipulation using sas programming Session-1 SAS Jargons and navigation though SAS PC ad SAS EG windows

LSI (SATA) Embedded SATA RAID LSI Embedded MegaRaid Intel VROC LSI (SAS) MegaRAID SAS 8880EM2 MegaRAID SAS 9280-8E MegaRAID SAS 9285CV-8e MegaRAID SAS 9286CV-8e LSI 9200-8e SAS IME on 53C1064E D2507 LSI RAID 0/1 SAS 4P LSI RAID 0/1 SAS 8P RAID Ctrl SAS 6G 0/1 (D2607) D2516 RAID 5/6 SAS based on