SlideShare a Scribd company logo
1 of 24
統計學與資料分析
SAS實習課 10/27
 胡 元

 Email: peonyhu@gmail.com

 Office hour: Mon. 13:00~14:00
PROC STANDARD
將資料檔內的數值變項標準化
X   0,   1 的標準分配
基本語法
1.    PROC STANDARD options;
     2.   VAR variables;

     3.   FREQ variables;

     4.   WEIGHT variables;

     5.   BY variables;
PROC STANDARD options
    DATA=輸入資料檔名稱

    OUT=輸出資料檔

    MEAN=新平均數

    STD=新標準差

    REPLACE /*用平均數取代遺漏值*/

*   VARDEF=DF/WEIGHT/N/WDF
PROC STANDARD options

 VARDEF=N
        DF
        WEIGHT
        WDF                     2
                       X    X
                 Var
                       df
PROC STANDARD options

 VARDEF=N:樣本數
        DF
        WEIGHT
        WDF                     2
                       X    X
                 Var
                       df
PROC STANDARD options

 VARDEF=N
 預設值    DF:自由度
        WEIGHT
        WDF                     2
                       X    X
                 Var
                       df
PROC STANDARD options

 VARDEF=N
        DF
        WEIGHT:觀察體*加權值之總和
        WDF                  2
                    X    X
              Var
                    df
PROC STANDARD options

 VARDEF=N
        DF
        WEIGHT
        WDF:weight-1
                                2
                       X    X
                 Var
                       df
基本語法
1.    PROC STANDARD options;
     2.   VAR variables;

     3.   FREQ variables;

     4.   WEIGHT variables;

     5.   BY variables;
1.      data a;
      2.   input section test1-   7.     proc standard
           test3;                        mean=80 std=5
      3.   stest1=test1;                 out=new;
      4.   stest2=test2;                19. var stest1-stest3;
      5.   stest3=test3;
                                  20.    proc print data=new;
      6.   datalines;
7.      1 94 91 87                21.    proc means data=new;
8.      …                               22. var stest1-stest3

9.      2 51 66 91                23.    run;
10.     ;
1.      data a;
      2.   input section test1-   7.     proc standard
           test3;                        mean=80 std=5
      3.   stest1=test1;                 out=new;
           stest2=test2;
      OUTPUT
      4.
                                        19. var stest1-stest3;
      5.   stest3=test3;
                                  20.    proc print data=new;
      6.   datalines;
7.      1 94 91 87                21.    proc means data=new;
8.      …                               22. var stest1-stest3

9.      2 51 66 91                23.    run;
10.     ;
OUTPUT
1.      data a;
      2.   input section test1-   7.     proc standard
           test3;                        mean=80 std=5
      3.   stest1=test1;                 out=new;
      4.   stest2=test2;                19. var stest1-stest3;
      5.   stest3=test3;
                                  20.    proc print data=new;
      6.   datalines;
7.      1 94 91 87                21.    proc means data=new;
8.      …                               22. var stest1-stest3

9.      2 51 66 91                23.    run;
10.     ;
SAS function
基本語法

FUNCTIONNAME(argument-1, argument-2)
SAS function
                                Arithmetic
                           Character handling
                              Mathematical
                                Probability
                       Quantile, random number
                            Sample statistics
                                Truncation
                                    …
http://statweb.calpoly.edu/jdoi/web/reference/SAS%20Functions%20by%20Categor
y.htm
以sum()為例
1.    data a;
       2. input section test1-test3;

       3. total=sum(test1,test2,test3);

       4. datalines;

5.    1 94 91 87
6.    …
7.    2 51 66 91
8.    ;
9.    proc print;
10.   run;
以sum()為例
1.    data a;
       2. input section test1-test3;

       3. total=sum(test1,test2,test3);
                          OUTPUT
       4. datalines;

5.    1 94 91 87
6.    …
7.    2 51 66 91
8.    ;
9.    proc print;
10.   run;
以mean()和sqrt()為例
1.    data a;
2.    input section test1-test3;
3.    total=mean(test1,test2,test3);
4.    new=SQRT(total)*10;
5.    datalines;
6.    1 94 91 87
7.    …
8.    2 51 66 91
9.    ;
10.   Proc print;
11.   Run;
以mean()和sqrt()為例
1.    data a;
2.    input section test1-test3;
3.    total=mean(test1,test2,test3);
4.    new=SQRT(total)*10;
5.    datalines;
              OUTPUT
6.    1 94 91 87
7.    …
8.    2 51 66 91
9.    ;
10.   Proc print;
11.   Run;
RNAD function
1.    data random;
2.    do n=1 to 100;
3.          x=rand('binominal',0.5,10);
4.          output;
5.    end;
6.    proc means data=random noprint;
7.      output out=samplemean
      mean=mean;
8.      var x;
9.      PROC PRINT;
10.   run;
1027實習

More Related Content

Viewers also liked

An Improved sentiment classification for objective word.
An Improved sentiment classification for objective word.An Improved sentiment classification for objective word.
An Improved sentiment classification for objective word.IJSRD
 
Индивидуальный план НИР Алексеев Р.А.
Индивидуальный план НИР Алексеев Р.А.Индивидуальный план НИР Алексеев Р.А.
Индивидуальный план НИР Алексеев Р.А.Рома Алексеев
 
Life Together Slides, 10/30/11
Life Together Slides, 10/30/11Life Together Slides, 10/30/11
Life Together Slides, 10/30/11CLADSM
 
Teresa y Esther
Teresa y EstherTeresa y Esther
Teresa y Estherreinater
 
оганнес 4 2
оганнес 4 2оганнес 4 2
оганнес 4 2nordprocmskh
 
παρουσίαση1
παρουσίαση1παρουσίαση1
παρουσίαση1pouspou
 
แผนการจัดการเรียนรู้ที่ 5
แผนการจัดการเรียนรู้ที่ 5แผนการจัดการเรียนรู้ที่ 5
แผนการจัดการเรียนรู้ที่ 5Meaw Sukee
 
A la découverte de la peinture numérique sandra chang #2- version diaporama
A la découverte de la peinture numérique sandra chang #2- version diaporamaA la découverte de la peinture numérique sandra chang #2- version diaporama
A la découverte de la peinture numérique sandra chang #2- version diaporamaVigne33
 
Slide Complejidad Multiversidad Mundo Real
Slide Complejidad Multiversidad Mundo RealSlide Complejidad Multiversidad Mundo Real
Slide Complejidad Multiversidad Mundo RealRuben Valdez
 
бениамин4 2кл
бениамин4 2клбениамин4 2кл
бениамин4 2клnordprocmskh
 
Five Step Process For Successful Presentations
Five Step Process For Successful PresentationsFive Step Process For Successful Presentations
Five Step Process For Successful Presentationsjeffurban
 
Reforma agraria
Reforma agrariaReforma agraria
Reforma agrariaJazminx3
 
гаспарян григ
гаспарян григгаспарян григ
гаспарян григnordprocmskh
 
Fakta a mýty o vyhodnocování online kampaní
Fakta a mýty o vyhodnocování  online kampaníFakta a mýty o vyhodnocování  online kampaní
Fakta a mýty o vyhodnocování online kampaníOptimics s.r.o.
 

Viewers also liked (20)

An Improved sentiment classification for objective word.
An Improved sentiment classification for objective word.An Improved sentiment classification for objective word.
An Improved sentiment classification for objective word.
 
Индивидуальный план НИР Алексеев Р.А.
Индивидуальный план НИР Алексеев Р.А.Индивидуальный план НИР Алексеев Р.А.
Индивидуальный план НИР Алексеев Р.А.
 
Life Together Slides, 10/30/11
Life Together Slides, 10/30/11Life Together Slides, 10/30/11
Life Together Slides, 10/30/11
 
Teresa y Esther
Teresa y EstherTeresa y Esther
Teresa y Esther
 
оганнес 4 2
оганнес 4 2оганнес 4 2
оганнес 4 2
 
παρουσίαση1
παρουσίαση1παρουσίαση1
παρουσίαση1
 
La gallina roja
La gallina rojaLa gallina roja
La gallina roja
 
Hola
HolaHola
Hola
 
แผนการจัดการเรียนรู้ที่ 5
แผนการจัดการเรียนรู้ที่ 5แผนการจัดการเรียนรู้ที่ 5
แผนการจัดการเรียนรู้ที่ 5
 
DEELNAME FORMULIER
DEELNAME FORMULIERDEELNAME FORMULIER
DEELNAME FORMULIER
 
A la découverte de la peinture numérique sandra chang #2- version diaporama
A la découverte de la peinture numérique sandra chang #2- version diaporamaA la découverte de la peinture numérique sandra chang #2- version diaporama
A la découverte de la peinture numérique sandra chang #2- version diaporama
 
Office 365
Office 365Office 365
Office 365
 
666
666666
666
 
Post cv
Post cvPost cv
Post cv
 
Slide Complejidad Multiversidad Mundo Real
Slide Complejidad Multiversidad Mundo RealSlide Complejidad Multiversidad Mundo Real
Slide Complejidad Multiversidad Mundo Real
 
бениамин4 2кл
бениамин4 2клбениамин4 2кл
бениамин4 2кл
 
Five Step Process For Successful Presentations
Five Step Process For Successful PresentationsFive Step Process For Successful Presentations
Five Step Process For Successful Presentations
 
Reforma agraria
Reforma agrariaReforma agraria
Reforma agraria
 
гаспарян григ
гаспарян григгаспарян григ
гаспарян григ
 
Fakta a mýty o vyhodnocování online kampaní
Fakta a mýty o vyhodnocování  online kampaníFakta a mýty o vyhodnocování  online kampaní
Fakta a mýty o vyhodnocování online kampaní
 

Similar to 1027實習

Random stability in systemVerilog and UVM based testbench
Random stability in systemVerilog and UVM based testbenchRandom stability in systemVerilog and UVM based testbench
Random stability in systemVerilog and UVM based testbenchKashyap Adodariya
 
Sas code for examples from a first course in statistics
Sas code for examples from a first course in statisticsSas code for examples from a first course in statistics
Sas code for examples from a first course in statisticsDr P Deepak
 
Dynamically Evolving Systems: Cluster Analysis Using Time
Dynamically Evolving Systems: Cluster Analysis Using TimeDynamically Evolving Systems: Cluster Analysis Using Time
Dynamically Evolving Systems: Cluster Analysis Using TimeMagnify Analytic Solutions
 
Math for anomaly detection
Math for anomaly detectionMath for anomaly detection
Math for anomaly detectionMenglinLiu1
 
E2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docxE2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docxjacksnathalie
 
Conf soat tests_unitaires_Mockito_jUnit_170113
Conf soat tests_unitaires_Mockito_jUnit_170113Conf soat tests_unitaires_Mockito_jUnit_170113
Conf soat tests_unitaires_Mockito_jUnit_170113SOAT
 
An introduction to Google test framework
An introduction to Google test frameworkAn introduction to Google test framework
An introduction to Google test frameworkAbner Chih Yi Huang
 
Tests unitaires pour PostgreSQL avec pgTap
Tests unitaires pour PostgreSQL avec pgTapTests unitaires pour PostgreSQL avec pgTap
Tests unitaires pour PostgreSQL avec pgTapRodolphe Quiédeville
 
lecture7.ppt
lecture7.pptlecture7.ppt
lecture7.pptEdFeranil
 
PHPunit and you
PHPunit and youPHPunit and you
PHPunit and youmarkstory
 
How to sas codes and tricks
How to sas codes and tricksHow to sas codes and tricks
How to sas codes and tricksعاطف رضا
 

Similar to 1027實習 (20)

Random stability in systemVerilog and UVM based testbench
Random stability in systemVerilog and UVM based testbenchRandom stability in systemVerilog and UVM based testbench
Random stability in systemVerilog and UVM based testbench
 
Sas tutorial 1018
Sas tutorial 1018Sas tutorial 1018
Sas tutorial 1018
 
Sas code for examples from a first course in statistics
Sas code for examples from a first course in statisticsSas code for examples from a first course in statistics
Sas code for examples from a first course in statistics
 
Dynamically Evolving Systems: Cluster Analysis Using Time
Dynamically Evolving Systems: Cluster Analysis Using TimeDynamically Evolving Systems: Cluster Analysis Using Time
Dynamically Evolving Systems: Cluster Analysis Using Time
 
Flight Data Analysis
Flight Data AnalysisFlight Data Analysis
Flight Data Analysis
 
Math for anomaly detection
Math for anomaly detectionMath for anomaly detection
Math for anomaly detection
 
Sas practice programs
Sas practice programsSas practice programs
Sas practice programs
 
E2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docxE2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docx
 
bluespec talk
bluespec talkbluespec talk
bluespec talk
 
Conf soat tests_unitaires_Mockito_jUnit_170113
Conf soat tests_unitaires_Mockito_jUnit_170113Conf soat tests_unitaires_Mockito_jUnit_170113
Conf soat tests_unitaires_Mockito_jUnit_170113
 
R and data mining
R and data miningR and data mining
R and data mining
 
White box testing
White box testingWhite box testing
White box testing
 
An introduction to Google test framework
An introduction to Google test frameworkAn introduction to Google test framework
An introduction to Google test framework
 
Tests unitaires pour PostgreSQL avec pgTap
Tests unitaires pour PostgreSQL avec pgTapTests unitaires pour PostgreSQL avec pgTap
Tests unitaires pour PostgreSQL avec pgTap
 
lecture7.ppt
lecture7.pptlecture7.ppt
lecture7.ppt
 
PHPunit and you
PHPunit and youPHPunit and you
PHPunit and you
 
array
arrayarray
array
 
Sas tutorial 0308
Sas tutorial 0308Sas tutorial 0308
Sas tutorial 0308
 
Sas tutorial 0308
Sas tutorial 0308Sas tutorial 0308
Sas tutorial 0308
 
How to sas codes and tricks
How to sas codes and tricksHow to sas codes and tricks
How to sas codes and tricks
 

More from Visual Cognition and Modeling Lab

More from Visual Cognition and Modeling Lab (20)

0405記憶
0405記憶0405記憶
0405記憶
 
0329學習
0329學習0329學習
0329學習
 
0315感覺與知覺
0315感覺與知覺0315感覺與知覺
0315感覺與知覺
 
0308大腦與行為.pptx
0308大腦與行為.pptx0308大腦與行為.pptx
0308大腦與行為.pptx
 
0301心理學史簡介
0301心理學史簡介0301心理學史簡介
0301心理學史簡介
 
0222課程介紹
0222課程介紹0222課程介紹
0222課程介紹
 
1026感覺與知覺
1026感覺與知覺1026感覺與知覺
1026感覺與知覺
 
(通識)心理學 20161018 自閉天才
(通識)心理學   20161018 自閉天才(通識)心理學   20161018 自閉天才
(通識)心理學 20161018 自閉天才
 
1012大腦與行為
1012大腦與行為1012大腦與行為
1012大腦與行為
 
0928心理學史簡介
0928心理學史簡介0928心理學史簡介
0928心理學史簡介
 
湯顯祖與莎士比亞
湯顯祖與莎士比亞湯顯祖與莎士比亞
湯顯祖與莎士比亞
 
0914課程介紹
0914課程介紹0914課程介紹
0914課程介紹
 
20160518 自閉症小孩的超能力記憶
20160518 自閉症小孩的超能力記憶20160518 自閉症小孩的超能力記憶
20160518 自閉症小孩的超能力記憶
 
20160525通識心理學 自閉症小孩的超能力記憶
20160525通識心理學 自閉症小孩的超能力記憶20160525通識心理學 自閉症小孩的超能力記憶
20160525通識心理學 自閉症小孩的超能力記憶
 
體驗劇場_1050524_W14_易用性測試_楊政達
體驗劇場_1050524_W14_易用性測試_楊政達體驗劇場_1050524_W14_易用性測試_楊政達
體驗劇場_1050524_W14_易用性測試_楊政達
 
體驗劇場_1050503_W11_原型設計_楊政達
體驗劇場_1050503_W11_原型設計_楊政達體驗劇場_1050503_W11_原型設計_楊政達
體驗劇場_1050503_W11_原型設計_楊政達
 
認知、科技與設計_1050108_期末成果展第六組
認知、科技與設計_1050108_期末成果展第六組認知、科技與設計_1050108_期末成果展第六組
認知、科技與設計_1050108_期末成果展第六組
 
認知、科技與設計_1050108_期末成果展第四組
認知、科技與設計_1050108_期末成果展第四組認知、科技與設計_1050108_期末成果展第四組
認知、科技與設計_1050108_期末成果展第四組
 
認知、科技與設計_1050108_期末成果展第二組
認知、科技與設計_1050108_期末成果展第二組認知、科技與設計_1050108_期末成果展第二組
認知、科技與設計_1050108_期末成果展第二組
 
認知、科技與設計_1050108_期末成果展第三組
認知、科技與設計_1050108_期末成果展第三組認知、科技與設計_1050108_期末成果展第三組
認知、科技與設計_1050108_期末成果展第三組
 

Recently uploaded

digital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingdigital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingrajputmeenakshi733
 
TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024Adnet Communications
 
1911 Gold Corporate Presentation Apr 2024.pdf
1911 Gold Corporate Presentation Apr 2024.pdf1911 Gold Corporate Presentation Apr 2024.pdf
1911 Gold Corporate Presentation Apr 2024.pdfShaun Heinrichs
 
WSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdfWSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdfJamesConcepcion7
 
PSCC - Capability Statement Presentation
PSCC - Capability Statement PresentationPSCC - Capability Statement Presentation
PSCC - Capability Statement PresentationAnamaria Contreras
 
business environment micro environment macro environment.pptx
business environment micro environment macro environment.pptxbusiness environment micro environment macro environment.pptx
business environment micro environment macro environment.pptxShruti Mittal
 
20200128 Ethical by Design - Whitepaper.pdf
20200128 Ethical by Design - Whitepaper.pdf20200128 Ethical by Design - Whitepaper.pdf
20200128 Ethical by Design - Whitepaper.pdfChris Skinner
 
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...Hector Del Castillo, CPM, CPMM
 
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...ssuserf63bd7
 
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdfGUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdfDanny Diep To
 
The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...
The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...
The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...Operational Excellence Consulting
 
Appkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptxAppkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptxappkodes
 
Guide Complete Set of Residential Architectural Drawings PDF
Guide Complete Set of Residential Architectural Drawings PDFGuide Complete Set of Residential Architectural Drawings PDF
Guide Complete Set of Residential Architectural Drawings PDFChandresh Chudasama
 
WSMM Media and Entertainment Feb_March_Final.pdf
WSMM Media and Entertainment Feb_March_Final.pdfWSMM Media and Entertainment Feb_March_Final.pdf
WSMM Media and Entertainment Feb_March_Final.pdfJamesConcepcion7
 
Unveiling the Soundscape Music for Psychedelic Experiences
Unveiling the Soundscape Music for Psychedelic ExperiencesUnveiling the Soundscape Music for Psychedelic Experiences
Unveiling the Soundscape Music for Psychedelic ExperiencesDoe Paoro
 
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptxGo for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptxRakhi Bazaar
 
Lucia Ferretti, Lead Business Designer; Matteo Meschini, Business Designer @T...
Lucia Ferretti, Lead Business Designer; Matteo Meschini, Business Designer @T...Lucia Ferretti, Lead Business Designer; Matteo Meschini, Business Designer @T...
Lucia Ferretti, Lead Business Designer; Matteo Meschini, Business Designer @T...Associazione Digital Days
 
Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Peter Ward
 
Memorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQMMemorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQMVoces Mineras
 
Cybersecurity Awareness Training Presentation v2024.03
Cybersecurity Awareness Training Presentation v2024.03Cybersecurity Awareness Training Presentation v2024.03
Cybersecurity Awareness Training Presentation v2024.03DallasHaselhorst
 

Recently uploaded (20)

digital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingdigital marketing , introduction of digital marketing
digital marketing , introduction of digital marketing
 
TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024
 
1911 Gold Corporate Presentation Apr 2024.pdf
1911 Gold Corporate Presentation Apr 2024.pdf1911 Gold Corporate Presentation Apr 2024.pdf
1911 Gold Corporate Presentation Apr 2024.pdf
 
WSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdfWSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdf
 
PSCC - Capability Statement Presentation
PSCC - Capability Statement PresentationPSCC - Capability Statement Presentation
PSCC - Capability Statement Presentation
 
business environment micro environment macro environment.pptx
business environment micro environment macro environment.pptxbusiness environment micro environment macro environment.pptx
business environment micro environment macro environment.pptx
 
20200128 Ethical by Design - Whitepaper.pdf
20200128 Ethical by Design - Whitepaper.pdf20200128 Ethical by Design - Whitepaper.pdf
20200128 Ethical by Design - Whitepaper.pdf
 
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
How Generative AI Is Transforming Your Business | Byond Growth Insights | Apr...
 
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
 
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdfGUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
 
The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...
The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...
The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...
 
Appkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptxAppkodes Tinder Clone Script with Customisable Solutions.pptx
Appkodes Tinder Clone Script with Customisable Solutions.pptx
 
Guide Complete Set of Residential Architectural Drawings PDF
Guide Complete Set of Residential Architectural Drawings PDFGuide Complete Set of Residential Architectural Drawings PDF
Guide Complete Set of Residential Architectural Drawings PDF
 
WSMM Media and Entertainment Feb_March_Final.pdf
WSMM Media and Entertainment Feb_March_Final.pdfWSMM Media and Entertainment Feb_March_Final.pdf
WSMM Media and Entertainment Feb_March_Final.pdf
 
Unveiling the Soundscape Music for Psychedelic Experiences
Unveiling the Soundscape Music for Psychedelic ExperiencesUnveiling the Soundscape Music for Psychedelic Experiences
Unveiling the Soundscape Music for Psychedelic Experiences
 
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptxGo for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
 
Lucia Ferretti, Lead Business Designer; Matteo Meschini, Business Designer @T...
Lucia Ferretti, Lead Business Designer; Matteo Meschini, Business Designer @T...Lucia Ferretti, Lead Business Designer; Matteo Meschini, Business Designer @T...
Lucia Ferretti, Lead Business Designer; Matteo Meschini, Business Designer @T...
 
Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...
 
Memorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQMMemorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQM
 
Cybersecurity Awareness Training Presentation v2024.03
Cybersecurity Awareness Training Presentation v2024.03Cybersecurity Awareness Training Presentation v2024.03
Cybersecurity Awareness Training Presentation v2024.03
 

1027實習

  • 1. 統計學與資料分析 SAS實習課 10/27 胡 元 Email: peonyhu@gmail.com Office hour: Mon. 13:00~14:00
  • 3. X 0, 1 的標準分配
  • 4. 基本語法 1. PROC STANDARD options; 2. VAR variables; 3. FREQ variables; 4. WEIGHT variables; 5. BY variables;
  • 5. PROC STANDARD options DATA=輸入資料檔名稱 OUT=輸出資料檔 MEAN=新平均數 STD=新標準差 REPLACE /*用平均數取代遺漏值*/ * VARDEF=DF/WEIGHT/N/WDF
  • 6. PROC STANDARD options VARDEF=N DF WEIGHT WDF 2 X X Var df
  • 7. PROC STANDARD options VARDEF=N:樣本數 DF WEIGHT WDF 2 X X Var df
  • 8. PROC STANDARD options VARDEF=N 預設值 DF:自由度 WEIGHT WDF 2 X X Var df
  • 9. PROC STANDARD options VARDEF=N DF WEIGHT:觀察體*加權值之總和 WDF 2 X X Var df
  • 10. PROC STANDARD options VARDEF=N DF WEIGHT WDF:weight-1 2 X X Var df
  • 11. 基本語法 1. PROC STANDARD options; 2. VAR variables; 3. FREQ variables; 4. WEIGHT variables; 5. BY variables;
  • 12. 1. data a; 2. input section test1- 7. proc standard test3; mean=80 std=5 3. stest1=test1; out=new; 4. stest2=test2; 19. var stest1-stest3; 5. stest3=test3; 20. proc print data=new; 6. datalines; 7. 1 94 91 87 21. proc means data=new; 8. … 22. var stest1-stest3 9. 2 51 66 91 23. run; 10. ;
  • 13. 1. data a; 2. input section test1- 7. proc standard test3; mean=80 std=5 3. stest1=test1; out=new; stest2=test2; OUTPUT 4. 19. var stest1-stest3; 5. stest3=test3; 20. proc print data=new; 6. datalines; 7. 1 94 91 87 21. proc means data=new; 8. … 22. var stest1-stest3 9. 2 51 66 91 23. run; 10. ;
  • 14. OUTPUT 1. data a; 2. input section test1- 7. proc standard test3; mean=80 std=5 3. stest1=test1; out=new; 4. stest2=test2; 19. var stest1-stest3; 5. stest3=test3; 20. proc print data=new; 6. datalines; 7. 1 94 91 87 21. proc means data=new; 8. … 22. var stest1-stest3 9. 2 51 66 91 23. run; 10. ;
  • 17. SAS function Arithmetic Character handling Mathematical Probability Quantile, random number Sample statistics Truncation … http://statweb.calpoly.edu/jdoi/web/reference/SAS%20Functions%20by%20Categor y.htm
  • 18. 以sum()為例 1. data a; 2. input section test1-test3; 3. total=sum(test1,test2,test3); 4. datalines; 5. 1 94 91 87 6. … 7. 2 51 66 91 8. ; 9. proc print; 10. run;
  • 19. 以sum()為例 1. data a; 2. input section test1-test3; 3. total=sum(test1,test2,test3); OUTPUT 4. datalines; 5. 1 94 91 87 6. … 7. 2 51 66 91 8. ; 9. proc print; 10. run;
  • 20. 以mean()和sqrt()為例 1. data a; 2. input section test1-test3; 3. total=mean(test1,test2,test3); 4. new=SQRT(total)*10; 5. datalines; 6. 1 94 91 87 7. … 8. 2 51 66 91 9. ; 10. Proc print; 11. Run;
  • 21. 以mean()和sqrt()為例 1. data a; 2. input section test1-test3; 3. total=mean(test1,test2,test3); 4. new=SQRT(total)*10; 5. datalines; OUTPUT 6. 1 94 91 87 7. … 8. 2 51 66 91 9. ; 10. Proc print; 11. Run;
  • 23. 1. data random; 2. do n=1 to 100; 3. x=rand('binominal',0.5,10); 4. output; 5. end; 6. proc means data=random noprint; 7. output out=samplemean mean=mean; 8. var x; 9. PROC PRINT; 10. run;