lj.z.test: Looney and Jones' Corrected Z-test

Description Usage Arguments Details Value Examples

View source: R/functions.R

Description

Perform two sample Looney and Jones' Corrected Z-test on vectors of data.

Usage

1
lj.z.test(x, y, alternative = c("two.sided", "less", "greater"))

Arguments

x

numeric vector

y

numeric vector

alternative

character string which specifies the alternative hypothesis. This can only be set as "two.sided" (default), "greater" or "less".

Details

This formula useful for the 2-sample tests. Setting alternative = "greater" provides the alternative that vector x has a larger mean than vector y. If paired = TRUE, both x and y must be specified and the same length. Missing values are removed, which can be done in pairs if paired = TRUE or singularly if paired = FALSE. If var.equal = TRUE the pooled estimate of the variance is used. By default, if var.equal = FALSE then the variance is estimated separately for both groups and the Welch modification to the degrees of freedom is used. If the input data are effectively constant compared to the larger of the two means, an error is generated.

Value

p value of the test

z-statistic.

Examples

1
2
3
vec1 <- c(3,7,NA,2,5,8,NA,5,4,5)
vec2 <- c(6,NA,4,7,3,NA,3,4,9,2)
lj.z.test(vec1, vec2, alternative = "greater")

smccrave/PMmccrave1 documentation built on Dec. 23, 2021, 3:25 a.m.