200 likes | 305 Views
PC baseret dataanalyse og simulering Week2 B. SAS. Procedurer. Delmængder af data II PROCedurer. Eksempel: proc print; where koen=‘F’;. Procedurer. proc contents; proc print;. Procedurer. proc sort; by koen; proc means; proc means; by koen;. Procedurer.
E N D
SAS Procedurer
Delmængder af data II PROCedurer • Eksempel: • proc print; where koen=‘F’;
Procedurer • proc contents; • proc print;
Procedurer • proc sort; by koen; • proc means; • proc means; by koen;
Procedurer • PROC MEANS; • PROC MEANS options; VAR variables; (PROC MEANS laver sit eget output)
Procedurer • output out=; • output out=B mean=meanx; • output out=mysas.helbred2 sum=sumx N=antal mean=mean;
Procedurer • proc univariate; • proc freq; • proc corr;
Hente et datasæt, som så er default • Libname F_sas ‘f:\dataanalyse\week2\SAS_F’; • Data temp; set F_sas.dat85tot;
Proc freq • proc freq; tables alder koen; • proc freq; tables alder * koen;
Proc tabulate • proc tabulate; class alder koen; table alder, koen;
Proc corr • proc corr; var hojde vaegt; Output: Rho = 0, nulhypotese P-værdi, test af om den sande correlation er 0
Proc corr; !-------------------------------! ! Korrelations-koefficienter ! !--------------!----------------! ! r ! korrelation ! !--------------!----------------! ! 0.00 - 0.19 ! meget svag ! ! 0.20 - 0.39 ! svag ! ! 0.40 - 0.69 ! moderat ! ! 0.70 - 0.89 ! staerk ! ! 0.90 - 1.00 ! meget staerk ! !--------------!----------------!
SAS Put og File
SAS - put og file Eksempel: File print; *File “H:/mysas/udfil”; put navn 1-10 @12 foeddag persnr /;
SAS Grafik
SAS / Graph • proc gplot; • proc gchart; • proc g3d; • proc gslide;
Proc gplot • proc corr; var hojde vaegt; symbol1 V=dot C=red I=RL CI=blue; • Proc gplot; plot hoejde*vaegt=1 hoejde*diastole=1; run;
SAS / Graph - æ, ø og å *goptions devmap=winansi keymap=winansi; proc gslide; title F=swiss "Blåbærgrød"; run;
SAS / Graph - fonte med æ, ø og å SIMULATE CENT**** (flere fonte) SWISS**** (flere fonte) , f.eks. Swiss, Swissl m.fl. ZAPF**** (flere fonte)