psw: Generate Output for Wilcoxon Signed-Rank Test

Description Usage Arguments Value Examples

View source: R/psw.R

Description

This function will generate the output for a Wilcoxon Signed-Rank Test for non-parametric paired samples

Usage

1
psw(x, y = NULL, z = NULL, tails = 2)

Arguments

x

A data frame column with the first variable to compare, a formula can also be passed in (~Var or Var~1)

y

A data frame column with the second variable to compare (~Var or Var~1), if a formula is passed in a data frame will be accepted

z

A data frame if formulas are used in x and y and data is not piped in

tails

an integer indicating whether the test is one-tailed '1' or two-tailed '2'

Value

A list of output for reporting $analysis_type, $results, $descriptive_statistics

Examples

1
2
3
4
psw_results <- pst_data %>% psw(~scones,~tea)
psw_results <- psw(pst_data$black_tea, pst_data$green_tea, tails = 1)
psw_results <- psw(pst_data$black_tea, pst_data$green_tea, tails = 2)
psw_results <- psw(scones ~ tea, pst_data_tall, tails = 1)

ECO230/eco230r documentation built on May 12, 2020, 2:10 a.m.