From fb40a9138c71316ebe8768e6e3fa3688fd9263be Mon Sep 17 00:00:00 2001
From: pdeffebach
Date: Fri, 3 Jan 2020 19:04:02 -0500
Subject: [PATCH] test squashing
---
src/HypothesisTests.jl | 4 ++--
src/correlation.jl | 1 +
src/t.jl | 3 ---
src/z.jl | 4 ----
4 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/src/HypothesisTests.jl b/src/HypothesisTests.jl
index fdfcab70..4fe8695f 100644
--- a/src/HypothesisTests.jl
+++ b/src/HypothesisTests.jl
@@ -29,9 +29,9 @@ using Distributions, Roots, StatsBase
using Combinatorics: combinations, permutations
using Rmath: pwilcox, psignrank
-import StatsBase.confint
+import StatsBase.confint, StatsBase.stderror
-export testname, pvalue, confint
+export testname, pvalue, confint, stderror
abstract type HypothesisTest end
check_same_length(x::AbstractVector, y::AbstractVector) = if length(x) != length(y)
diff --git a/src/correlation.jl b/src/correlation.jl
index d40b1b66..3d8a6a84 100644
--- a/src/correlation.jl
+++ b/src/correlation.jl
@@ -69,6 +69,7 @@ end
default_tail(::CorrelationTest) = :both
pvalue(test::CorrelationTest; tail=:both) = pvalue(TDist(dof(test)), test.t, tail=tail)
+StatsBase.stderror(test::CorrelationTest) = sqrt(1/dof(test))
function show_params(io::IO, test::CorrelationTest, indent="")
println(io, indent, "number of observations: ", nobs(test))
diff --git a/src/t.jl b/src/t.jl
index c10dac31..909be189 100644
--- a/src/t.jl
+++ b/src/t.jl
@@ -51,9 +51,6 @@ end
# The standard error of the difference
StatsBase.stderror(x::TTest) = x.stderr
-# The magnitude of the difference
-meandiff(x::TTest) = x.xbar
-
## ONE SAMPLE T-TEST
struct OneSampleTTest <: TTest
diff --git a/src/z.jl b/src/z.jl
index 18915a81..ec3c8ca8 100644
--- a/src/z.jl
+++ b/src/z.jl
@@ -51,10 +51,6 @@ end
# The standard error of the difference
StatsBase.stderror(x::TTest) = x.stderr
-# The magnitude of the difference
-meandiff(x::TTest) = x.xbar
-
-
## ONE SAMPLE Z-TEST
struct OneSampleZTest <: ZTest