BookmarkSubscribeRSS Feed
CE_SAS
Fluorite | Level 6

Hello,

 

Is it possible with SAS to compute 95% confidence intervals for a Wilcoxon Signed Rank test, sample size 50?

 

Currently I am using the following code, which do not provide CI :

ods select TestsForLocation;

proc univariate data = MFP.NutrientsT2_Diff ;

title "Nonparametric Test NoQC - Wilcoxon Signed Rank Test";

var Sod_Diff Sod_DiffQC;

run;

 

Thank you!

4 REPLIES 4
Rick_SAS
SAS Super FREQ

PROC UNIVARIATE provides a one-sample test for location. Based on your sample code, it looks like you might be interested in a two-sample test for the difference between two groups,  If so, use PROC NPAR1WAY and the WILCOXON option. An example is provided in the PROC NPAR1WAY documentation. Notice that you'll have to transform your data set from "wide" format to "long" format by including a binary CLASS variable that indicates the groups.

 

That said, I don't understand your statement. You don't get confidence intervals for test. A statistical test generates a statistic which you use to accept or reject some hypothesis at some significance level. You can get CIs for the parameter that the statistic estimates, but not for a test.

CE_SAS
Fluorite | Level 6

I have used Wilcoxon Signed Rank, as my data are both dependent and not normally distributed.

 

With NPAR1WAY, I thought, you have rank sum test and assume independent data.

 

I indeed refer to the t-statistic of the Wilcoxon Signed Rank.

 

Thank you!

Rick_SAS
SAS Super FREQ

The bootstrap method enables you to examine the sampling distribution of any statistic.

For a univariate statistic, start by reading 

"Compute a bootstrap confidence interval in SAS"

If you decide to go with the two-sample version, imitate the ideas and programs in

"The bootstrap method in SAS: A t test example"

 

pink_poodle
Barite | Level 11

You can use Hodges - Lehmann (HL) estimation to show the CIs:

proc NPAR1WAY data=tegs /*wilcoxon*/;
title "Nonparametric test to compare respiration between growth and gap area";
class orchard;
var apples;
exact wilcoxon HL;
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 4507 views
  • 1 like
  • 3 in conversation