Statistics

Sunday, October 28, 2007

Wilcoxon Signed-Rank Test

### H0: median = tau vs Ha: median > tau
### Normal approximation

tau<-0.015
N <-20
x <- rnorm(N, 0.05, 0.1)

V <- sum(rank(abs(x-tau))[x-tau>0])
M <- N*(N+1)/4
sigma <- sqrt(N*(N+1)*(2*N+1)/24)

Z <- (V - M) / sigma

p_value <- 1-pnorm(Z)

wilcox.test(x, alternative="g", mu=tau)
Posted by cahn at 11:35 AM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2009 (8)
    • ►  December (6)
    • ►  November (1)
    • ►  April (1)
  • ▼  2007 (12)
    • ▼  October (12)
      • Friedman Test for Randomized Block Designs
      • Kurskal-Wallis Test for the One-Way Layout
      • Wilcoxon's signed rank test - paired
      • Sign Test for a Matched Pairs Experiment
      • Wilcoxon Signed-Rank Test
      • Power and Sample Size for one-way ANOVA
      • Type I ~ IV sum of squares
      • Sample Size Requirement to detect Gene-Environment...
      • 유의수준 (level of significance)
      • 유의확률 (p-value)
      • Parametric vs Nonparametric
      • Standard Error in a finite population

About Me

My photo
cahn
View my complete profile