Skip to content

Creating empirical distribution #358

@tomaskrehlik

Description

@tomaskrehlik

I am writing a small package that does unit root tests on a time series. I was always saddened by the inconsistent framework of various R statistical tests so I thought how to do it right in case of Julia. I am aware of the HypothesisTests package, but there seems to be no general interface to statistical tests. Given that the statistical tests have rather standard set of attributes I created a mock-up types that I think would work quite well.

       type StatisticalTest
        statistic::Float64
        # Probably some Univariate distribution maybe done from empirical dist.
        distribution:: ...
        pvalue::Float64
        description::ASCIIString
        nullHypothesis::ASCIIString
        function StatisticalTest(statistic, distribution, pvalue)
            new(statistic, distribution, pvalue, description, nullHypothesis)
        end
    end

However, I got to a dead-end with this type in case of the unit root tests, because there is no standard distribution and the critical values are tabulated. (It is also possible to simulate them quite easily.) Is there a way how to specify some empirical distribution within the Distributions package? Ideally, I would like the distribution to be a type from Distributions also taking all the other facilities from there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions