signtest: The Sign Test

Description Usage Arguments Value Author(s) References Examples

View source: R/signtest.R

Description

A nonpametric test for center. The sign test compares the median to a value.

Usage

1
2
signtest(x, m = NULL, alpha = NULL,
alternative =c("two.sided", "greater", "less"), conf.level=NULL, exact = FALSE)

Arguments

x

A vector of sample data.

m

The median to test. Defaults to 0.

alpha

The Significance level, defaults to 0.05.

alternative

Defaults to two.sided. Used to determine what type of test to run.

conf.level

Defaults to NULL. Used to construct a confidence interval. Input as a decimal.

exact

Defaults to FALSE. Used to determine whether to run the exact procedure or a large sample approximation.

Value

B

The Test Statistic

Significance Level

Returns the alpha value.

P-value

Returns the p-value from the Sign Test.

Confidence Interval

The confidence interval requested.

Author(s)

D. Lukke Sweet

References

Higgins, J. J. (2005). An Introduction to modern nonparametric statistics. Belmont: Thomson Brooks/Cole.

Wiley Series in Probability and Statistics: Nonparametric Statistical Methods (3rd Edition). (2013). John Wiley & Sons.

Examples

1
2
  ## Run the Sign Test on the vector.
  signtest(c(1.8, 3.3, 5.65, 2.25, 2.5, 3.5, 2.75, 3.25, 3.10, 2.70, 3, 4.75, 3.4), m=3.5)

Example output

 Exact Sign Test 
 
 H0: The population median is =  3.5 
 HA: The population median is not equal to  3.5 
 
 B = 10 
 
 Significance Level = 0.05 
 The p-value is  0.03858 
 There is enough evidence to conclude that the population median is different than 3.5 at a significance level of  0.05 
 
   
 

nonpar documentation built on April 29, 2020, 9:36 a.m.

Related to signtest in nonpar...