1n sass0 sas8 data c

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ~: data y.a; set y.chengji; if X 3 < 60; run; SAS§SŠó{0 SASê⥆êâ8 dataÚ êâC† êâ C† 2. ^‡Šé ‚ª: if ^‡Lˆª then SASfŠé; ~: data y.b1 y.b2; set y.chengji; if X 3 < 60 then output b1; if X 3 >= 60 then output b2; run; (½ ¤: else output b2;) SAS§SŠó{0 SASê⥆êâ8 dataÚ êâC† êâ C† Ê. deleteŠé Š•if-then fé ~: data y.d; set y.chengji; if X 3 >= 60 then delete; run; SAS§SŠó{0 SASê⥆êâ8 dataÚ êâC† êâ C† 8. retainŠé ¦•½ CþŠ3e˜g-E¦^ž ‚ª: retain Cþ¶<Њ>; ~: data y.e; input x@@; retain sx1 0 sx2 0; sx1=sx1+x; sx2=sx2+x*x; cards; 254367 ; run; proc print; run; 3 (Њe"Ž, K•0) SAS§SŠó{0 SASê⥆êâ8 dataÚ êâC† êâ C† $1± , 3outputI•Œ Obs 1 2 3 4 5 6 ˜ÜL‚: x 2 5 4 3 6 7 sx1 2 7 11 14 20 27 sx2 4 29 45 54 90 139 SAS§SŠó{0 SASê⥆êâ8 dataÚ êâC† êâ C† Ô. outputŠé ̇õU´: ÑÑ*ÿ # êâ8. l. Ì‚Šé ‚ª: do <Ì‚Cþ>; eZSASŠé; end; 5: e¦^Ì‚Cþ, I•Ñ§ Š‰Œ(Ú•, "ŽŠ•1): (1) Ì‚Cþ=å©Š to ªŠ <by Ú•> (2) Ì‚Cþ=Š1 Š2 · · · Šk SAS§SŠó{0 SASê⥆êâ8 dataÚ êâC† êâ C† ~: |^VÇØ gŽUúª 11 0 1+x2 dx = π CqOŽπ 4 Š. ©Û: P Ω = {(x, y )|0 ≤ x, y ≤ 1}, D = {(x, y )|y ≤ 1 , 0 ≤ x, y ≤ 1}. 1 + x2 ?1‘ÅÝ ng, P á3«•D¥kmg, KdVÇØ¥”ªÇ %CVÇ” uy, Œ π m ≈, 4 n ¤±Œ π≈ 4m . n SAS§SŠó{0 SASê⥆êâ8 dataÚ êâC† êâ C† ~: |^VÇØ gŽUúª 11 0 1+x2 dx = π CqOŽπ 4 Š. ©Û: P Ω = {(x, y )|0 ≤ x, y ≤ 1}, D = {(x, y )|y ≤ 1 , 0 ≤ x, y ≤ 1}. 1 + x2 ?1‘ÅÝ ng, P á3«•D¥kmg, KdVÇØ¥”ªÇ %CVÇ” uy, Œ π m ≈, 4 n ¤±Œ π≈ 4m . n SAS§SŠó{0 SASê⥆êâ8 dataÚ êâC† êâ C† §S: data a; retain m 0; do n=1 to 10000; x=ranuni(12345); y=ranuni(123457); if y < 1/(1 + x ∗ x) then m = m + 1; if n > 9990 then pi=4 ∗ m/n; output; end; proc print; run;...
View Full Document

This note was uploaded on 09/26/2013 for the course STAT 06120640 taught by Professor Pang during the Fall '13 term at Zhejiang University.

Ask a homework question - tutors are online