sign_test: Sign test for given median

View source: R/sign_test.R

sign_testR Documentation

Sign test for given median

Description

Sign test for given median

Usage

sign_test(d, x, med0 = 0, tol = 1e-06)

Arguments

d

a data frame

x

unquoted name of column to test

med0

null median (defaults to zero)

tol

(default 1e-6) how close a data value has to be to the null median to be considered equal to null median (and discarded)

Value

list of two elements: table of values above and below null median, data frame of 1-sided and 2-sided P-values

Author(s)

Ken Butler, butler@utsc.utoronto.ca

Examples

d=data.frame(z=1:10)
sign_test(d,z,3.5)
sign_test(d,z,3)
sign_test(datasets::mtcars, mpg, 25)

nxskok/smmr documentation built on Jan. 17, 2024, 3:26 p.m.