Skip to content

Commit

Permalink
test squashing
Browse files Browse the repository at this point in the history
  • Loading branch information
pdeffebach committed Jan 4, 2020
1 parent 03c2475 commit fb40a91
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/HypothesisTests.jl
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/correlation.jl
Expand Up @@ -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))
Expand Down
3 changes: 0 additions & 3 deletions src/t.jl
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/z.jl
Expand Up @@ -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
Expand Down

0 comments on commit fb40a91

Please sign in to comment.