BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
lindamtl
Fluorite | Level 6

how to use non-parametric way to analysis one sample?

for two sample, we can use parlway/wilcoxon, like below. But if only analysis one sample, like bp under placebo , how to do?

proc npar1way data=demog wilcoxon;
class treatment;
var bp_change;
output out=pvalue wilcoxon;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
lindamtl
Fluorite | Level 6

I checked, in 9.4sas, use univariate procedure.

View solution in original post

7 REPLIES 7
macalves
Fluorite | Level 6

The "1way" in the npar1way procedure refers to the existence of one factor, in this case, the treatment, but not to one sample. 

 

In this case we have two independent sample (placebo and real drug), so, npar1way can do analysis in case of three or more treatments like drug A, drug B and Placebo. To test one sample I use the proc univariate, like in this example:

data test;
   do sample = 1 to 10;
      y = 3+normal(8);
      output;
   end;
run;
proc univariate data=test mu0=3 normal plot;

   var y;
run;
These comand tests the hypotesis of a true mean equals to three.

Three tests are presented in the results: Student t test (parametric) and two non-parametric tests: Signed Rank Test (Wilcoxon test to one sample) and sign test.

The "normal" option bring normality tests to help us to choose the more appropriate test.

If normality assumption is reasonable, t test must be chosen, if not, a non-parametric test can be more appropriate. Signed Rank test (Wilcoxon) can be considered if we have skewness coefficient between -2 and +2, but not normality. Otherwise, Sign test must be considered when the data are not normally distributed and have asymmetric behaviour.

An special case is the test of paired data, when we calculate the difference between two values observed in dependent conditions like in the left hand and in the right hand of a person, each one treated with one product, for example. It is common to test the mean of the differences is equal to zero (mu0=0).

WillTheKiwi
Pyrite | Level 9

I stopped using non-parametric analyses about 25 years ago, when I realized that only severe non-normality of the dependent variable is an issue, and in such cases it can be addressed with transformation (usually log) or a generalized linear model. Normality of the sampling distribution of the outcome statistic is an issue, if you use a t statistic to make inferences, but normality is practically guaranteed by the Central Limit Theorem, and you can't test for it. I laugh out loud whenever I see an author reporting that they tested their data for normality, and getting significance, opted for non-parametric analyses. 

 

Will

lindamtl
Fluorite | Level 6

I checked, in 9.4sas, use univariate procedure.

SteveDenham
Jade | Level 19

PROC MEANS and PROC UNIVARIATE are likely candidates. Either will estimate medians, quartiles and the interquartile range. Those would be the descriptive non-parametric parameters for a single arm.

 

If you have access to SAS 15.2, PROC TTEST has a bootstrap option. In my opinion, this is a more robust nonparametric approach. It does require you to do some exercises to make it applicable to a single arm, but that is not a stopper.

 

SteveDenham

Brett_King
Calcite | Level 5
In addition to Steve's response, I always find simple distributional graphs helpful to compare results of one variable broken into various subgroups.
ballardw
Super User

@lindamtl wrote:

how to use non-parametric way to analysis one sample?

for two sample, we can use parlway/wilcoxon, like below. But if only analysis one sample, like bp under placebo , how to do?

proc npar1way data=demog wilcoxon;
class treatment;
var bp_change;
output out=pvalue wilcoxon;
run;


Example data and the type of question to answer.

I am not sure what you mean by "bp under placebo". That implies a second variable, placebo, which would be a class variable

Ksharp
Super User
Yes. Check Signed Rank test (a non-parameter method of ttest).
Check @Rick_SAS blog here:
https://blogs.sas.com/content/iml/2023/07/19/wilcoxon-signed-rank.html

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 730 views
  • 4 likes
  • 7 in conversation