SlideShare ist ein Scribd-Unternehmen logo
1 von 20
0613 無母數統計
游如淇
Psy.j.c.yu@gmail.com
常用格式
PROC NPAR1WAY <options>;
VAR 依變項;
CLASS 獨變項;
EXACT <options>;
BY 變項名稱;
OUTPUT;
PROC NPAR1WAY <option>
• DATA=資料檔名
• MISSING: 將有遺漏值的數據歸成同一組
• ANOVA:另外執行傳統的變異數分析
• WILCOXON:將數據轉換成由小到大的名次
• MEDIAN:將原始資料二分
• VW:計算 Van der Waerden 值
• SAVAGE:將原始數據轉換成 Savage 值
• EDF:會根據EDF計算統計值
指令選項
• VAR 依變項
– 列出依變項名稱
– 若省略此選項,則輸入的數值變項皆視為依變項
• CLASS 獨變項;
– NPAR1WAY 是單因子分析,只能有一個獨變項
EXACT options
• 針對前述任何一種統計值執行精確檢定
• 若不選用此指令,則會執行大樣本下的
– WILCOXON (rank sum)
– MEDIAN
– VW
– SAVAGE
2

指令選項
• BY 變項名稱
– 依據此指令將資料檔分成小資料檔
– 針對每個小資料檔分別執行分析
• OUTPUT
– OUT=輸出資料檔名
例子
• Halverson & Sherwood (1932)
– 探討藥物劑量(Dose)對體重增加(Gain)的影響
• 依照劑量將受試者分為五組
– 0 0.04 0.07 0.10 0.13
data a;
input Dose N;
do i=1 to N;
input Gain @@;
output;
end;
cards;
0 10
228 229 218 216 224 208 235 229 233 219
;
Run;
proc npar1way;
class dose;
var gain;
run;
Result
Wilcoxon
Median
VW
Savage
EDF
EDF
Wilcoxon signed rank test
data a;
Input before after @@;
diff=before-after;
cards;
130 120 170 163 125 120 170 135 130 143 130 136
145 144 160 120
;
proc univariate;
var diff;
run;
Wilcoxon signed rank test
補充:Freidman’s rank test
data a;
input lecturer m1 m2 m3 @@;
group=1; score=m1;output;
group=2; score=m2;output;
group=3; score=m3;output;
cards;
1 50 58 54
2 32 37 25
3 60 70 63
4 58 60 55
5 41 66 59
6 36 40 28
7 26 25 20
8 49 60 50
9 72 73 75
10 49 54 42
11 52 57 47
12 36 42 29
13 37 34 31
14 58 50 56
15 39 48 44
16 25 29 18
17 51 63 68
;
proc freq;
tables lecturer*group*score/noprint
cmh2 score=rank;
run;
Freidman’s rank test
END

Weitere ähnliche Inhalte

Was ist angesagt?

Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
confluent
 

Was ist angesagt? (20)

Real-Time Anomoly Detection with Spark MLib, Akka and Cassandra by Natalino Busa
Real-Time Anomoly Detection with Spark MLib, Akka and Cassandra by Natalino BusaReal-Time Anomoly Detection with Spark MLib, Akka and Cassandra by Natalino Busa
Real-Time Anomoly Detection with Spark MLib, Akka and Cassandra by Natalino Busa
 
Auto-Train a Time-Series Forecast Model With AML + ADB
Auto-Train a Time-Series Forecast Model With AML + ADBAuto-Train a Time-Series Forecast Model With AML + ADB
Auto-Train a Time-Series Forecast Model With AML + ADB
 
コーポレート職用会社紹介資料.pdf
コーポレート職用会社紹介資料.pdfコーポレート職用会社紹介資料.pdf
コーポレート職用会社紹介資料.pdf
 
DOCSIS 3.0 Broadband Intelligence using IPDR
DOCSIS 3.0 Broadband Intelligence using IPDRDOCSIS 3.0 Broadband Intelligence using IPDR
DOCSIS 3.0 Broadband Intelligence using IPDR
 
2022 Trends in Enterprise Analytics
2022 Trends in Enterprise Analytics2022 Trends in Enterprise Analytics
2022 Trends in Enterprise Analytics
 
Intro to r & hadoop
Intro to r & hadoopIntro to r & hadoop
Intro to r & hadoop
 
Business Intelligence Presentation - Data Mining (2/2)
Business Intelligence Presentation - Data Mining (2/2)Business Intelligence Presentation - Data Mining (2/2)
Business Intelligence Presentation - Data Mining (2/2)
 
Data weekender4.2 azure purview erwin de kreuk
Data weekender4.2  azure purview erwin de kreukData weekender4.2  azure purview erwin de kreuk
Data weekender4.2 azure purview erwin de kreuk
 
Guru4Pro Data Vault Best Practices
Guru4Pro Data Vault Best PracticesGuru4Pro Data Vault Best Practices
Guru4Pro Data Vault Best Practices
 
Introduction to Data Engineering
Introduction to Data EngineeringIntroduction to Data Engineering
Introduction to Data Engineering
 
Automated Testing For Protecting Data Pipelines from Undocumented Assumptions
Automated Testing For Protecting Data Pipelines from Undocumented AssumptionsAutomated Testing For Protecting Data Pipelines from Undocumented Assumptions
Automated Testing For Protecting Data Pipelines from Undocumented Assumptions
 
IoT Sensor Analytics with Python, Jupyter, TensorFlow, Keras, Apache Kafka, K...
IoT Sensor Analytics with Python, Jupyter, TensorFlow, Keras, Apache Kafka, K...IoT Sensor Analytics with Python, Jupyter, TensorFlow, Keras, Apache Kafka, K...
IoT Sensor Analytics with Python, Jupyter, TensorFlow, Keras, Apache Kafka, K...
 
Process Mining In Today’s Platforms Economy: Opportunities and Challenges (WI...
Process Mining In Today’s Platforms Economy: Opportunities and Challenges (WI...Process Mining In Today’s Platforms Economy: Opportunities and Challenges (WI...
Process Mining In Today’s Platforms Economy: Opportunities and Challenges (WI...
 
Power BI Topics
Power BI TopicsPower BI Topics
Power BI Topics
 
AWS Immersion Day Mapfre - Confluent
AWS Immersion Day Mapfre   -   ConfluentAWS Immersion Day Mapfre   -   Confluent
AWS Immersion Day Mapfre - Confluent
 
Oracle to Azure PostgreSQL database migration webinar
Oracle to Azure PostgreSQL database migration webinarOracle to Azure PostgreSQL database migration webinar
Oracle to Azure PostgreSQL database migration webinar
 
Scale and Optimize Data Engineering Pipelines with Software Engineering Best ...
Scale and Optimize Data Engineering Pipelines with Software Engineering Best ...Scale and Optimize Data Engineering Pipelines with Software Engineering Best ...
Scale and Optimize Data Engineering Pipelines with Software Engineering Best ...
 
Power BI Create lightning fast dashboard with power bi & Its Components
Power BI Create lightning fast dashboard with power bi & Its Components Power BI Create lightning fast dashboard with power bi & Its Components
Power BI Create lightning fast dashboard with power bi & Its Components
 
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
Event Driven Architecture with a RESTful Microservices Architecture (Kyle Ben...
 
Business Intelligence Presentation (1/2)
Business Intelligence Presentation (1/2)Business Intelligence Presentation (1/2)
Business Intelligence Presentation (1/2)
 

0613 sas實習課