The script begins by creating a dataset named 'Arthritis' using inline data (datalines) describing treatment effectiveness (Active or Placebo) and patient response. It then uses PROC NPAR1WAY to perform non-parametric statistical tests (Wilcoxon and median) on the 'Response' variable grouped by 'Treatment'. The ODS GRAPHICS option is enabled to generate Wilcoxon box plots and median plots, providing a visualization of the results.
Datenanalyse
Type : CREATION_INTERNE
The 'Arthritis' dataset is created directly within the script via datalines instructions, providing observations on treatment, response, and frequency.
1 Codeblock
DATA STEP Data
Erklärung : This DATA STEP block creates the 'Arthritis' dataset. It defines three variables: 'Treatment' (character), 'Response' (numeric), and 'Freq' (numeric). The data for these variables is provided directly in the script via the DATALINES statement. Each line after DATALINES represents an observation, with values corresponding to the defined variables.
Kopiert!
data Arthritis;
input Treatment $ Response Freq;
datalines;
Active 5 5 Active 4 11 Active 3 5 Active 2 1 Active 1 5
Placebo 5 2 Placebo 4 4 Placebo 3 7 Placebo 2 7 Placebo 1 12
;
1
DATA Arthritis;
2
INPUT Treatment $ Response Freq;
3
DATALINES;
4
Active 55 Active 411 Active 35 Active 21 Active 15
Erklärung : This block executes PROC NPAR1WAY to perform a non-parametric analysis. The input dataset is 'Arthritis'. The 'wilcoxon' and 'median' options request the execution of Wilcoxon and median tests, respectively. The 'class Treatment;' statement specifies 'Treatment' as the classification variable, and 'var Response;' indicates that 'Response' is the variable to be analyzed. 'freq Freq;' uses the 'Freq' variable to weight observations. Activating ODS GRAPHICS allows for the generation of plots, including Wilcoxon box plots and median plots, for better visualization of the results.
Kopiert!
ods graphics on;
proc npar1way data=Arthritis wilcoxon median
plots=(wilcoxonboxplot medianplot);
class Treatment;
var Response;
freq Freq;
run;
ods graphics off;
1
ods graphics on;
2
PROC NPAR1WAYDATA=Arthritis wilcoxon median
3
plots=(wilcoxonboxplot medianplot);
4
class Treatment;
5
var Response;
6
freq Freq;
7
RUN;
8
ods graphics off;
Dieses Material wird von We Are Cas "wie besehen" zur Verfügung gestellt. Es gibt keine ausdrücklichen oder stillschweigenden Garantien hinsichtlich der Marktgängigkeit oder Eignung für einen bestimmten Zweck in Bezug auf die hierin enthaltenen Materialien oder Codes. We Are Cas ist nicht verantwortlich für Fehler in diesem Material, wie es jetzt existiert oder existieren wird, noch bietet We Are Cas technischen Support dafür an.
Urheberrechtsinformationen : S A S S A M P L E L I B R A R Y
NAME: NPAR1EX1
TITLE: Documentation Example 1 for PROC NPAR1WAY
PRODUCT: STAT
SYSTEM: ALL
KEYS: nonparametric methods, categorical data analysis,
KEYS: Wilcoxon test, Wilcoxon scores box plot,
KEYS: median test, median plot
PROCS: NPAR1WAY
REF: PROC NPAR1WAY, Example 1
Zugehörige Dokumentation
Aucune documentation spécifique pour cette catégorie.
SAS und alle anderen Produkt- oder Dienstleistungsnamen von SAS Institute Inc. sind eingetragene Marken oder Marken von SAS Institute Inc. in den USA und anderen Ländern. ® zeigt die Registrierung in den USA an. WeAreCAS ist eine unabhängige Community-Site und nicht mit SAS Institute Inc. verbunden.
Diese Website verwendet technische und analytische Cookies, um Ihre Erfahrung zu verbessern.
Mehr erfahren.