ࡱ> qsp%` bjbjNN .,,4M    LwLwLw8wx&,yy"yyy Q%S%S%S%S%S%S%$:(h*dw%Q[;V[[w%  yyM#%___[f yLyQ%_[Q%__V *$yty 0bOuLw>`5$%0&u++$+$0m|_dMw%w%^&[[[[HWdW       Lab One: SAS Orientation Also: 2x2 Tables, PROC FREQ, Odds Ratios, Risk Ratios Lab Objectives After todays lab you should be able to: Load SAS program. Move between the EDITOR, LOG, and OUTPUT windows, and understand their different functions. Understand SAS libraries. Understand SAS temporary library (the WORK library). Use the Explorer Browser in SAS. Understand how to write comments in SAS. Understand the basic structure of a SAS program and SAS code. Understand the difference between SAS datasteps and SAS procedures. Use SAS as a calculator. Know some SAS logical and mathematical operators. Assign a library name (libname statement and point-and-click). Input grouped data directly into SAS. Use PROC FREQ to output contingency tables. Use PROC FREQ to calculate chi-square statistics and odds ratios and risk ratios. Understand the concept of a SAS macro (just a function). If time, create a simple SAS macro to calculate the confidence intervals for an odds ratio. LAB EXERCISE STEPS: Follow along with the computer in front Open SAS: From the desktop( double-click Applications( double-click SAS icon There are 3 windows in SAS: the editor, output, and log windows. You enter SAS code into the editor (the enhanced editor screen alerts you to potential errors through its coloring scheme). You run SAS programs that appear in the editor by clicking on the running man icon in your toolbar. After a program runs, the output appears in the output screen. The execution of a program is logged in the log screen, as are errors.* You can open the editor, output, or log windows by selecting them in the VIEW menu at the top of your screen. 3. SAS programs are composed of data steps and procedures (abbreviated as PROCs). Data-steps deal with importing, entering, and manipulating data. Procedures deal with analyzing data (making numerical or graphical summaries and running specific statistical tests). We will first work with SAS datasteps: Type the following data step in the editor window: data example1; x=18*10**-6; run;  Explanation of code: data example1;  x=18*10**-6; run;   Select (highlight) the code (using your mouse), and click on the running man icon. 5. Use the Explorer Browser on the left hand side of your screen to locate and view the dataset example1 in the work library (file cabinet icons represent data libraries). Double click on the libraries icon (looks like a filing cabinet). Double click on the work library icon (looks like one drawer in a filing cabinet). Double click on the dataset example1 to open it in viewtable mode. The dataset should contain a single value. Click on the up one level icon (folder with an up-arrow on the toolbar) to return to the library icons. 6. Type the following code in the editor window, and run the program (select the code and click on running man). data _null_; x=18*10**-6;  put x; run;  Check what has been entered into the log. Should look like: 5 data _null_; 6 x=18*10**-6; 7 put x; 8 run; 0.000018 NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds Using your Explorer Browser, observe that no new datasets have been added to the work library. Type the following code in the editor window and run the program.   data _null_; *use SAS as calculator;  x=LOG(EXP(-.5)); put x; run; SAS LOG should contain: 9 data _null_; *use SAS as calculator; 10 x=LOG(EXP(-.5)); 11 put x; 12 run; -0.5 Use SAS to calculate the probability that corresponds to the probability of getting X=25 from a binomial distribution with N=100 and p=0.5 (for example, whats the probability of getting 25 heads EXACTLY in 100 coin tosses?): data _null_; p= pdf('binomial', 25,.5, 100); put p; run; Use SAS to calculate the probability that corresponds to the probability of getting an X of 25 or more from a binomial distribution with N=100 and p=.5 (e.g., 25 or more heads in 100 coin tosses): data _null_; pval= 1-cdf('binomial', 24, .5, 100); put pval; run; Libraries are references to places on your hard drive where datasets are stored. Datasets that you create in permanent libraries are saved in the folder to which the library refers. Datasets put in the WORK library disappear when you quit SAS (they are not saved). Libraries are temporary references to places on your hard drive where datasets are stored. You can assign a library name through the libname statement (step 14) or through point-and-click features, as follows: Click on new library icon (slamming file cabinet on the toolbar). Browse to find the extension to the Desktop. COPY THIS EXTENSION USING CONTROL C. Name the library hrp261. Hit OK to exit and save. Whenever you open SAS anew you will need to rename the library. If you have saved code to do this, it will save you a step. Type the following code in the editor (and run) to assign the folder Desktop the library name hrp261. USE CONTROL V to paste the extension (may differ on different computers). libname hrp261 C:\Documents and Settings\mitl-pc.LANE-LIB\Desktop;    Type the following code in the editor to copy the dataset example1 into the hrp261 library (rename it hrp261.example1):  data hrp261.example1;  set example1;  x2=x**2;  drop x; run; Find the dataset in the hrp261 library using the Explorer Browser. Browse to find the example1 dataset in the Desktop folder on your hard drive. This dataset will remain intact after you exit SAS. Next, we will input data from a 2x2 table directly into a SAS dataset. In the SAS editor screen, input the following data set. These are grouped data from the atherosclerosis and depression example (from the Rotterdam study) in lecture 1:  data Rotterdam; input IsDepressed HasBlockage Freq;  datalines; 1 1 28 1 0 53 0 1 511 0 0 1328 run; /*Use PROC PRINT to view the data*/ proc print data=Rotterdam; run; Verify that the data have been printed to your output screen as below: Is Has Obs Depressed Blockage Freq 1 1 1 28 2 1 0 53 3 0 1 511 4 0 0 1328 Generate the 2x2 contingency table using PROC FREQ.  proc freq data=Rotterdam order=data; tables IsDepressed*HasBlockage /nopercent norow nocol;  weight freq; run;  RESULTS: Table of IsDepressed by HasBlockage IsDepressed HasBlockage  Frequency 1 0 Total  1 28 53 81  0 511 1328 1839  Total 539 1381 1920   Request statistics for contingency tables using PROC FREQ.  proc freq data=Rotterdam order=data; tables IsDepressed*HasBlockage / chisq measures expected;  weight freq; run;  RESULTS: Table of IsDepressed by HasBlockage IsDepressed HasBlockage Frequency Expected Percent Row Pct Col Pct 0 1 Total  0 1328 511 1839 1322.7 516.26 69.17 26.61 95.78 72.21 27.79 96.16 94.81 1 53 28 81 58.261 22.739 2.76 1.46 4.22 65.43 34.57 3.84 5.19 Total 1381 539 1920 71.93 28.07 100.00 Statistic DF Value Prob Chi-Square 1 1.7668 0.1838 Likelihood Ratio Chi-Square 1 1.6976 0.1926 Continuity Adj. Chi-Square 1 1.4469 0.2290 Mantel-Haenszel Chi-Square 1 1.7659 0.1839 Phi Coefficient 0.0303 Contingency Coefficient 0.0303 Cramer's V 0.0303 Fisher's Exact Test  Cell (1,1) Frequency (F) 1328 Left-sided Pr <= F 0.9250 Right-sided Pr >= F 0.1157 Table Probability (P) 0.0407 Two-sided Pr <= P 0.2060   Estimates of the Relative Risk (Row1/Row2) Type of Study Value 95% Confidence Limits Case-Control (Odds Ratio) 1.3730 0.8589 2.1948  Cohort (Col1 Risk) 1.2440 0.9138 1.6937  Cohort (Col2 Risk) 0.9061 0.7715 1.0642 Sample Size = 1920     22. A SAS macro is just a function. You can save it for future use, to avoid repetitive coding. For example, enter the following macro to calculate upper and lower confidence limits for any 2x2 table. The user enters the desired level of confidence (e.g., 95%, 99%, etc.) and the cell sizes from the 2x2 table (cells a-d). The macro calculates the point estimate and confidence limits for the given 2x2 table and enters the results into the SAS LOG.  A % sign in SAS denotes a macro name. In SAS, a variable bracketed by & and . (e.g., &a.) denotes a macro variable (entered into the macro by the user).  /**MACRO to calculate XX% confidence limits for an odds ratio for a given confidence level (entered as a whole number, eg 95) and the 2x2 cell sizes: a,b,c,d, where a is the diseased, exposed cell**/ %macro oddsratio (confidence,a,b,c,d); *enter confidence percent as a whole number, e.g. "95"; data _null_; OR=&a.*&d./(&b.*&c.); lnOR=log(OR); error=sqrt(1/&a.+1/&b.+1/&c.+1/&d.); Z=-probit((1-&confidence./100)/2); *gives left hand Z score, multiply by negative; lower=exp(lnOR-Z*error); upper=exp(lnOR+Z*error); put OR; put lower; put upper; run; %mend oddsratio; /**Invoke MACRO using data from depression/atherosclerosis example and ask for 95% confidence limit**/ %oddsratio(95, 28, 511, 53, 1328); SAS LOG should contain: 1.3729645903 0.8588505235 2.194831015 APPENDIX A: Some useful logical and mathematical operators and functions: Equals: = or eq Not equal: ^= or ~= or ne Less then: < or lt, <= or le, Greater than: > or gt, >= or ge,** power * multiplication / division + addition - subtractionINT(v)-returns the integer value (truncates) ROUND(v)-rounds a value to the nearest round-off unit TRUNC(v)-truncates a numeric value to a specified length ABS(v)-returns the absolute value MOD(v)-calculates the remainderSIGN(v)-returns the sign of the argument or 0 SQRT(v)-calculates the square root EXP(v)-raises e (2.71828) to a specified power LOG(v)-calculates the natural logarithm (base e) LOG10(v)-calculates the common logarithm APPENDIX B: Some useful probability functions in SAS Normal Distribution Cumulative distribution function of standard normal: P(Xd"Z)=probnorm(Z) Z value that corresponds to a given area of a standard normal (probit function): Z= ((area)=probit(area) To generate random Z ( normal(seed) Exponential Density function of exponential ((): P(X=k) = pdf('exponential', k, () Cumulative distribution function of exponential ((): P(Xd"k)= cdf('exponential', k, () To generate random X (where (=1)( ranexp(seed) Uniform P(X=k) = pdf('uniform', k) P(Xd"k) = cdf('uniform', k) To generate random X ( ranuni(seed) Binomial P(X=k) = pdf('binomial', k, p, N) P(Xd"k) = cdf('binomial', k, p, N) To generate random X ( ranbin(seed, N, p) Poisson P(X=k) = pdf('poisson', k, () P(Xd"k) = cdf('poisson', k, ()     HRP 261 SAS LAB ONE, January 14, 2009 PAGE  PAGE 10 This is a SAS data step. The first line tells SAS to create a dataset called example1. This dataset will be placed into the work library, which is the default temporary library. Same as above but the _null_ tells SAS to not bother to make a dataset (e.g., if you just want to use SAS as a calculator). Note that each command in a SAS program must be punctuated with a semi-colon. Misplaced or missing semi-colons cause many errors and much frustration in SAS, so pay attention to their placement! Assigns a value to the variable x. Variable name goes to the left of the equals sign; value or expression goes to the right of the equals sign. Note that each data step or proc in SAS ends with a run statement. The program is not actually executed, however, until you click on the running man icon. Tells SAS to print the value of x in the SAS log. Adds a new variable x-squared to the dataset. Drops the variable x ; keep x2; would have same result. Starts with the dataset work.example1 Makes a new dataset called example1 in the hrp261 library. Code for moving a dataset, part of a dataset, or a dataset with modifications into a new library. Name the library Note use of informative variable names.  Depressed NotAtherosclerosis28511None531328 Use SAS as a calculator. See Appendix for more mathematical and logical operators. Dont forget the semi-colon! Location of the folder where the datasets are physically located.  EMBED Equation.3   EMBED Equation.3  Comments (ignored by SAS but critical for programmers and users) are bracketed by /* and */ and should appear green in the editor. Comments (ignored by SAS but critical for programmers and users) may be bracketed by * and ; Or by /* and */ Options (optional features) follow a front slash in a SAS procedure. These options tell SAS to present the chi-square statistic as well as measures of association (odds ratios and risk ratios). Asks SAS to present the expected table for the chi-square test. See Appendix for more probability functions. This is your first example of a SAS procedure. The print procedure simply prints data in the output screen. Column1 risk ratio= EMBED Equation.3  Probability of having atherosclerosis if you are not depressed. Column2 risk ratio= EMBED Equation.3  Probability of also having atherosclerosis if you are depressed: Chi-square is non-significant. Probability of NOT having atherosclerosis if you are NOT depressed. Expected counts are highlighted here. Tells SAS how to ORDER the rows and columns. The default is to use numerical or alphabetical order, which would make cell a the undepressed, unblocked cell. Instead, order=data tells SAS to order rows and columns according to the order that the values appear in the dataset (1s before 0s). Probability of NOT having atherosclerosis if you are depressed: Fishers exact is automatically calculated when you request chi-square statistics for a 2x2 table. No Atheroscl. PREVIEW: We will later learn the use of PROC FORMAT#+6P '   : ; W X s  q4hB*CJOJQJ^JaJfHphq 4hB*CJOJQJ^JaJfHphq :h5B* CJOJQJ\^JaJfHphq h6] h5\ jhhOJPJQJ^JhkeB hkeB>*h6>*] h>*h'PQ`J k  / a D } h^h & F !6??  o p !2B7$8$H$^` 7$8$H$^ & F7$8$H$ & F7$8$H$7$8$H$  2378ABDIKLNQRTWXZǩǥeJeǩǥ4hB*CJOJQJ^JaJfHphq =jh5B* CJOJQJU\^JaJmHnHphu h>*7jhB*CJOJQJU^JaJmHnHphuh:h5B* CJOJQJ\^JaJfHphq 4hB*CJOJQJ^JaJfHphq :h5B* CJOJQJ\^JaJfHphq BTYZ\]_`abchmLY 7$8$H$` 87$8$H$^8 & F-7$8$H$ h7$8$H$^h & F-7$8$H$  !7$8$H$7$8$H$^`7$8$H$Z[]^LPQX]_`befhiknr쭒wYYY:w=jh5B* CJOJQJU\^JaJmHnHphu:h5B* CJOJQJ\^JaJfHphq 4hB*CJOJQJ^JaJfHphq 4hB*CJOJQJ^JaJfHphq :h5B* CJOJQJ\^JaJfHphq 7jhB*CJOJQJU^JaJmHnHphu h>*hjhCJUmHnHuYhrxyz|}?i0 7$8$H$^7$8$H$^` & F)7$8$H$ h7$8$H$^hhh7$8$H$^h`h7$8$H$rsvwz{012389?AXYZg§x§]B4hB* CJOJQJ^JaJfHphq 4hB*CJOJQJ^JaJfHphq h5CJOJQJ\aJhCJOJQJaJjhCJUmHnHuh4hB*CJOJQJ^JaJfHphq :h5B* CJOJQJ\^JaJfHphq =jh5B* CJOJQJU\^JaJmHnHphu024Ymv{|7$8$H$^`7$8$H$^` h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7$8$H$ 7$8$H$gdkeB & F)7$8$H$gdkeB$$$$$$$$$$$$$$$$ѺќfG(f=hkeBhkeB>*B*CJOJQJ^JaJfHphq =hkeBhkeB>*B*CJOJQJ^JaJfHphq 4hkeBB*CJOJQJ^JaJfHphq 4hkeBB*CJOJQJ^JaJfHphq :hkeB5B* CJOJQJ\^JaJfHphq -jhkeB5CJOJQJUaJmHnHuhkeBCJOJQJaJhkeBhkeB5CJOJQJaJ#hkeBhkeB5\fHq $$%%%% %%%%%%/%& &&&K'eWEW-W.jhkeBCJOJQJU^JaJmHnHu#hkeBhkeB5CJOJQJ^JaJhkeBCJOJQJ^JaJ7jhkeBB*CJOJQJU^JaJmHnHphuhkeBCJOJQJaJ:hkeB5B* CJOJQJ\^JaJfHphq =jhkeB5B* CJOJQJU\^JaJmHnHphu4hkeBB*CJOJQJ^JaJfHphq 4hkeBB*CJOJQJ^JaJfHphq  &6&`&&&#'_'''(V((()T)))*R*S*T***$+p++,J,,7$8$H$ 7$8$H$gdkeBK'\'((Q*S*T*U**$+ - -V........//=0>00000߻ߥӉnnXXFX#h5>*CJOJQJ\^JaJ*jhCJOJQJUaJmHnHu4jh5CJOJQJU\^JaJmHnHuhCJOJQJaJhkeBhkeB5CJOJQJaJ*jhkeBCJOJQJUaJmHnHu.jhkeBCJOJQJU^JaJmHnHuhkeBCJOJQJaJhkeBCJOJQJ^JaJ#hkeBhkeB5CJOJQJ^JaJ,,,, -M---..V...................7$8$H$ 7$8$H$gdkeB....F///=00000000 1181A1133 3 3 3133 & F+7$8$H$ h7$8$H$^h7$8$H$000117181?1@1A11122o2r22233`3a3c33333t4ǷǰǰǰǝˊtY4hB* CJOJQJ^JaJfHphq *jhCJOJQJUaJmHnHu$hB* aJfHphq $jh5CJU\mHnHu h6]jhCJUmHnHuh$hB*aJfHphq +jhB*CJUaJmHnHphuhCJOJQJaJ333)4l4t4u444445,5a5555555555O6s6t6u6v6 7$8$H$^7$8$H$t4u4{44444444444445555555555!5#5$5%5'5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JQJaJh% to change 0s and 1s to meaningful labels. depressed If you forget the weight statement, SAS will see only 1 observation in each cell of your 2x2 table. The variable freq stores the counts in each 2x2 cell. Not depressed Atheroscl. The probit function returns the Z score associated with a given area under a normal curve. When creating a macro, its important to include detailed comments that instruct a new user on how to use your macro. Options (optional features) follow a front slash in a SAS procedure. These options tell SAS to omit the cell, row, and column percents in the 2x2 table.  Has outcome No outcomeExposedabUnexposedcd ^_`amnqyz $$7$8$H$Ifa$\kd$$IflFF j6    4 la $7$8$H$If $$7$8$H$Ifa$ $7$8$H$If_kd=$$IflFF j6    4 la `_kd$$IflFF j6    4 la,1h/ =!"#$% $$If!vh5r5#vr#v:V l0n(65r54a$$If!vh5r5#vr#v:V l0n(65r54aw$$If!vh555#v#v#v:V l655/ 4$$If!vh555#v#v#v:V l655/ / 4$$If!vh555#v#v#v:V l655/ / 4gDd DJ  C A? "2G \/Sޝk u `!G \/Sޝk xkxڕR=KA5&P B0r~@rDH 'Kc`Hc^ {{{;3'  `x(2 "qkT[8ϹeBNR)ZT%T*VT 8IUxII11x޴| !Q#4r;~*83 9AjΡ YӊL.r}G.^\sl΍٘[DY5+g9w]U^UA5 Y/rEȹD^e9sO;m2|mծ]qkUΡŸx^#gǍ ֮F\l=܈{pz ?V6bPVa}FRЄx&0 [pqs?'i/}IMC=/iH**SCH(@gt@'a(-xG0B-;lWyrI,ڦo + IUR$~VYj~}2$.9f"L- Sa&-|1Ͼ^vogu2Kң$ WgRy-}մgOas|fnqcV|f`z- c[p? My5x;*x>xl!M z"Dd tJ  C A? "29@ȢRR9 u `!9@ȢRR9  xmRK@~w4? ԡfmA椃ъc S'qv*(8]u 8;h_)Uzw@6J IpPZj#}Zh&5 lʯ(:ѱR4Gz,Xmt~j:ИE~DStVUפVUIoG2M&' w~q?;؊Fv%lfWQm.Oߛ4&f fL)x^^ʑ9/:'2[gJ.}g ..NBQq9^TK$`|G9/C:+h 22soV߇n wܔ37UYl87 a%D9ڧs܊7j;,1pnwNJ{6bߘ;,f{!ʳx` t.nxܪ7#G͑}7yD߸ ccq$$If!vh555#v#v:V l655/ 4$$If!vh555#v#v:V l655/ / 4$$If!vh555#v#v:  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgijklmno}ruvwxyz{|~Root Entry F Tut@ Data hIWordDocument.ObjectPool @Mu Tu_1198510551F@Mu@MuOle CompObjfObjInfo !"$%&'()+,-.0 FMicrosoft Equation 3.0 DS Equation Equation.39qnxgl OR=28*132853*511=1.3730Equation Native _1198510945 F@Mu@MuOle CompObj f FMicrosoft Equation 3.0 DS Equation Equation.39q?k 95% CI for lnOR =lnOR1.96 1a+1b+1c+1d  =ln(1.370)1.96 12ObjInfo Equation Native  [_1198511207F@Mu@MuOle 8+153+1511+11328  =("0.152,0.786)e ".152 =.8589e ..786 =2.1948 FMicrosoft Equation 3.0 DS Equation Equation.39qCompObjfObjInfoEquation Native _1198511396F@Mu@Muœ  2881=.34565111839=.2778=1.2440 FMicrosoft Equation 3.0 DS Equation Equation.39qOle CompObjfObjInfoEquation Native   u  5381=.654313281839=.7221=0.9061Oh+'0   @ L X dpxLab Objectives kristinc Normal.dotKrisV l655/ / 41Table+SummaryInformation(#DocumentSummaryInformation8*8CompObj/q 0Q 0Q 0Q 0Q 0Q 0 Q 0 Q 0 Q 0 Q 0 Q 0Q0Q0Q0Q0Q0Q0Q0Q0Q0Q0 00 00 0p 0p 0p0000000000000000000000- 000- 0c- 0c- 0c- 0c0000000000) 000000000000) 00) 00000000000@@@ NormalCJ_HaJmH sH tH 8@8 Heading 1$@&>*D@D Heading 2$7$8$@&H$5\@@@ Heading 3$@& 56\]>@> Heading 4$@& 5CJ\d@d Heading 5$7$8$@&H$%>*B*CJaJfHphq < @< Heading 9 $@&>*CJDA@D Default Paragraph FontVi@V  Table Normal :V 44 la (k@(No List 4@4 Header  !4 @4 Footer  !6U@6 Hyperlink >*B*phFV@!F FollowedHyperlink >*B* ph^B@2^ Body Text 7$8$H$%CJOJQJ^JaJfHq .X@A. Emphasis6].)@Q. Page NumberlC@bl Body Text Indent7$8$H$^B*aJfHphq 6P@r6 Body Text 2CJ6Q@6 Body Text 3CJ>@>  Footnote TextCJaJ:-`, ^}z( j  _ 4 ? T exC Tn @ tQ_ X[]Z`H_jfpsNq :-`, ^}z( j  _ 4 ? T e   !"#$%&'()*+,-./012345xCPQ`Jk/aD} op !2BTYZ\]_`abch m L Y h r x y z | }    ? i 0 2 4 Y m v { | !"#)./<=TOQSUVW\]#+5:;<`a}+,o89:oqrstuv!"MHJMU_`abce !"#$./VW 6`#_ V !T!!!"R"S"T"""$#p##$J$$$$$ %M%%%&&V&&&&&&&&&&&&&&&&&&&&&&F'''=(((((((( ))8)A))++ + + +1++++),l,t,u,,,,,-,-a----------O.s.t.u.v.w.x.y.z.....//-/L/m/v///////0J0m00001B1k1l1n1p1q11112T2m2222223;3j3k3s33333334G4O4m444444444444444444455566666g7h7887888f8888899g9h9y9z999999999999999999999995:6:T:U::::::::::Q;R;;;;<<<<<<<<$=a=b=c=d=e=f======>A>B>b>c>>>>>??6@7@@@@@ A AAA{A|AAAAAAA+B,BBBBC?CKCLCOCWCXC`CbCdCeCoCqCsCtCuCvCyC00000Q0Q 0Q 0Q 0Q 0Q00000) 00000000) 0000000) 00) 0) 0=) 0=) 0=) 0=0) 00000000) 000000000000) 0 0) 0 0) 0 00000000000000000) 0 0000000000) 0 00000000000000000000000000000000000000000) 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000+ 0+ 00000000000000000000000000000000000000000 00000 0 00000 00000 0 0000F0* 0101* 0101* 0101(01* 0q20q2* 0q20q2* 0q20q20q20q20q20q20q20q20q20q20q280q20&4 0&4@0X00@0X00@0X00@0X00@0@0@0@0@0@0@0@0X00p000000008000x000000000000000000 000 000 0 0 0 0 0 0 0 0 0 000000000000000000000000000000000000000000000000000000000000000000000000000000 00 000 0 0 0 0 0 0 0 0 0 000PQ`Jk/aD} op !2BTYZ\]_`abch m L Y h r x y z | }    ? i 0 2 4 Y m v { | !"#)./<=TOQSUVW\]#+5:;<`a}+,o89:oqrstuv!"MHJMU_`abceT!!!"R"%&&V&&&&&&&&&4>7@yC 0 00 00F0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0 F 0 F 0 F 0 F 0 F 0F0F0F0F0F0F0F0F0F0F0 00 00 0K 0K 0K0000000000000000000000- 000- 0>- 0>- 0>- 0>0000000000) 000000000000) 00) 0000000000000000) 00000000) 0000000) 00) 0) 0) 0) 0) 00) 00000000) 000000000000) 0 0) 0 0) 0 00000000000000000) 0 0000000000) 0 0000000000000000000000000000000000000000@0@) 0@0@0@0@0Z00JX00X00Z00Z00Z00JZ00Z000Z00Z00Z000Z00Z00Z00Z00Z00 Z00`.XZ00`.XZ00d  3>LLLO Zrg)mp!!!$$K'0t4E5a6p9&;;<8==>4?C8HK&*,.0135789;<>@ACFHIJNOQRSTUVY^` BY0!e$ &,.3v67k9B;6?wBDDDaFrI')+-/246:=?BDEGKLMPWXZ[\]_def(3:>EHO!!t # % ::::/X2$jO$NAp[׷Ka\d2$N ] 3 $= $NB ^@ S D:T _ C *_8 *N ` 3 '< 'NB a S D;Z f S 0f  0NB i@ S DN j 3 /! /H n # F NB o S DEN p 3 3D 3H q # 6B 6NB r S DAN s 3 4C 4l t 0t3 T  i #" "f  S -  -ZB  S D-gZB  S DiNB  S D4NB  S D5NB  S D6H  # .$ .H  # 1& 1H  # 2) 2H  # ,* ,NB @ S DNB  S D(NB  S D'NB  S D%NB @ S D#T  C / NB  S D.NB  S D-B   + NB @ S D,B   +2 +B   (0 (B   &1 &B S  ?2BCZ] h r z 0 2 Y  OQS+a:oJKcT" %&&'=((()8)9):);)<)=)>))++,-O.xCbH&St ?U tzC0tztCyA(Otntd &t Ot t t@%t]t`n%t@'t: $t trOt!i'9tEQ tq%tt 5%t  t W!tfj'ti8Hy t 2{tPfmb%t  4&tH@7'tx@+tOvtNH'tj%# t t1t1t`t`""tptXpt RtRt :'t0 %t4t4t_@t0D&tP(tp&Pttr$t! 5tj.  t72b tZft_M$tY5t^{tat`%' t]#t\` t[g tXN/ trytq'UtsJN'tpS&toF0tn U#t OLE_LINK3yC9yC **T *. *T * *԰ * *T **Ա**TrryC   {{yC 9*urn:schemas-microsoft-com:office:smarttagsState8 *urn:schemas-microsoft-com:office:smarttagsCity9 *urn:schemas-microsoft-com:office:smarttagsplace d  x2 ; k n #' +L ./ UVbc+, ALvg;FJUv9 T !!""""##*%L%,!,A,H,|,,,,,, --/-5-------Q.Z.//=/?/_/a/i/k/12B2H2_2e22233"3%3]3c3}3333333333344444:4X4[4]4d4o4r4v4y4{4444444444444444Q?\?@@AAAAyC37TW! ' L P k n s v H L k n 4 8 ^ b o r v y "),   58bf}vz +5Y_  @!H!""*%L%s%u%V''S+X+e+l+++),,,l,p,,,,,,,,,,,- -/-6---------------Q.[.12]2_22233z333333333344;4X4\4m4o444444444444444556686888e8y8|8899e9U::;;<<====c>>>>J?O? AAAAyC33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333332cB m r }  #/K8+^$%-!:"T"" %l%&&11T2m22244444444444444h9x9996:S:::;;f====@@ AAAAAA?CtCyC44444444444444yC-_AJLCjk C j A^ ɀ[XP?7 z9,:>xk8zRdR4Tjka \}!dRD R!bg["N4{p%dR`&Jz^zc''t)ZB\-Z>F1^ 9GfS5!:T:f1CKCWCXC`CbCdCeCoCqCsCtCyC@ L1234@xC@:<>@@Unknown Gz Times New Roman5Symbol3& z ArialI& ??Arial Unicode MS;Wingdings?5 z Courier NewC5  SAS Monospace71 Courier3: Times"1hV\kF [F(L?,(L?,(!x4dc4c4 2qHX ?2Lab ObjectiveskristincKristin-                           ! " # $ % & ' ( ) * + , MSWordDocWord.Document.89q