Built-in tests

Independent Binomials

EqualitySampler.Simulations.proportion_testFunction
proportion_test(
    successes::AbstractArray{T<:Integer, 1},
    observations::AbstractArray{T<:Integer, 1},
    partition_prior::Union{Nothing, AbstractPartitionDistribution};
    spl,
    mcmc_settings,
    ϵ,
    n_leapfrog,
    kwargs...
) -> Any

Fit independent binomials to the successes and observations and explore equality constraints among the probabilities.

Arguments

  • successes, vector of successes.
  • observations vector of no trials.
  • partition_prior, the prior to use over partitions or nothing, which implies sampling from the full model.

Keyword arguments

  • spl, overwrite the sampling algorithm passed to Turing. It's best to look at the source code for the parameter names and so on.
  • mcmc_settings, settings for sampling.
  • ϵ, passed to Turing.HMC, only used when partition_prior !== nothing.
  • n_leapfrog, passed to Turing.HMC, only used when partition_prior !== nothing.
  • kwargs..., passed to AbstractMCMC.sample.

Post Hoc Tests in One-Way ANOVA

EqualitySampler.Simulations.anova_testFunction
anova_test(
    f::StatsModels.FormulaTerm,
    df::DataFrames.DataFrame,
    args...;
    kwargs...
) -> Any

Using the formula f and data frame df fit a one-way ANOVA.

anova_test(
    y::AbstractVector{<:AbstractFloat},
    g::AbstractVector{<:Integer},
    args...;
    kwargs...
) -> Any

Using the vector y and grouping variable g fit a one-way ANOVA.

anova_test(
    y::AbstractVector{<:AbstractFloat},
    g::AbstractVector{<:UnitRange{<:Integer}},
    args...;
    kwargs...
) -> Any

Using the vector y and grouping variable g fit a one-way ANOVA. Here g is a vector of UnitRanges where each element indicates the group membership of y.

anova_test(
    df::Union{DataFrames.DataFrame, EqualitySampler.Simulations.SimpleDataSet},
    partition_prior::Union{Nothing, AbstractPartitionDistribution};
    spl,
    mcmc_settings,
    modeltype,
    rng
) -> Any

Arguments:

  • df a DataFrame or SimpleDataSet.
  • partition_prior::Union{Nothing, AbstractPartitionDistribution}, either nothing (i.e., fit the full model) or a subtype of AbstractPartitionDistribution.

Keyword arguments

  • spl, overwrite the sampling algorithm passed to Turing. It's best to look at the source code for the parameter names and so on.
  • mcmc_settings, settings for sampling.
  • modeltype, :old indicated all parameters are sampled whereas reduced indicates only g and the partitions are sampled using an integrated representation of the posterior.
  • rng a random number generator.