Successfully reported this slideshow.
Upcoming SlideShare
×

# SAS 11/01

776 views

Published on

• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

### SAS 11/01

1. 1. PROC STANDARD SAS FUNCTIONS SAS OPERATIONS Canicia Smith caniciasmith@gmail.comOffice hour: Wed 13:00-14:00
2. 2. PROC STANDARD
3. 3. What does proc standard do?1. It standardizes variables in a data set to agiven mean and standard deviation.2. It creates a new data set containing thestandardized valueshttp://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000146748.htm
4. 4. ExampleNew data set
5. 5. SAS FUNCTIONS
6. 6. SAMPLE STATISTICSMean=Mean(var1, var2)Sum=Sum(var1, var2)Square root=Sqrt(var)Round=round(var, .1)
7. 7. SAMPLE STATISTICS (con.)Maxmax(argument1, argument2)Minmin(argument1, argument2)Modmod(argument1,argument-2)Eg. 9/3Argument1- the dividend=9Argument2-the divisor=3
8. 8. LOG• LogX=log(var);
9. 9. PROBABILITYEx. Poisson probability distributioncdf (‘POISSON’, n, m)N is an integer random variable (range: n=0,1, ..)M is a numeric mean parameter (range: m>0)
10. 10. EXPONENTIAL• Exponential x=exp(1.0)=2.718exp (argument)
11. 11. SAS OPERATORS
12. 12. SAS OPERATORS (ARITHMETIC)Symbol Definition Example raise to a ** a**3 power * multiplication 2*y / division var/5 + addition num+3 var1- - subtraction var2
13. 13. SAS OPERATORS (COMPARISON)Symbo Mnemonic Definition Examplel Equivalent = EQ equal to a=3 ^= NE not equal to a ne 3 > GT greater than num>5 < LT less than num<5 greater than or equal >= GE var>=300 to <= LE less than or equal to var<=300 num in (3, 4, IN IN equal to one of a list 5)
14. 14. SAS OPERATORS (LOGICAL)Symbol Mnemonic Equivalent Example & AND (a>b) & (c>d) / OR (a>b) / (c>d) ^ NOT not (a>b)
15. 15. QUESTIONS~?????
16. 16. Possible Exam questions Create a data set to give this output. Which statement should be inserted to produce the group output?
17. 17. Create a data set to get this output..
18. 18. Proc means What statement would produce the following output?
19. 19. What statements do you need to produce the secondoutput?
20. 20. 5 students name John (boy), Mary (girl), Dick (boy),Lucy (girl), and James (boy) has the following scores inthe following subjects: NamesSubject John Mary Dick Lucy JamesMath 90 80 78 74 70English 96 60 78 50 74French 87 87 56 78 95Physics 45 65 34 77 73History 77 66 88 56 891. Write a sas program to output this data.2. Find the mean and sum of each student’s grades.