adf

package module
v0.0.0-...-8a5d71c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

README

adf

GoDoc

ADF is a Go library for running the Augmented Dickey-Fuller test on data to determine stationarity.

Getting started

API documentation is available via godoc.

License

Copyright 2016 President and Fellows of Harvard College

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

Overview

Package adf implements the Augmented Dickey-Fuller test. This is a port of the implementation of adf given here: https://github.com/Netflix/Surus/blob/master/src/main/java/org/surus/math/AugmentedDickeyFuller.java.

Index

Constants

View Source
const (
	LPenalty      = 0.0001 // L penalty to pass to ridge regression
	DefaultPValue = -3.45  // Test p-value threshold
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ADF

type ADF struct {
	Series          []float64 // The time series to test
	PValueThreshold float64   // The p-value threshold for the test
	Statistic       float64   // The test statistic
	Lag             int       // The lag to use when running the test
}

An instance of an ADF test

func New

func New(series []float64, pvalue float64, lag int) *ADF

New creates and returns a new ADF test.

func (ADF) IsStationary

func (adf ADF) IsStationary() bool

IsStationary returns true if the tested time series is stationary.

func (*ADF) Run

func (adf *ADF) Run()

Run runs the Augmented Dickey-Fuller test.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL