{"id":23828782,"url":"https://github.com/ssoudan/unit-root","last_synced_at":"2025-09-07T10:32:37.224Z","repository":{"id":60097659,"uuid":"541020586","full_name":"ssoudan/unit-root","owner":"ssoudan","description":"Unit root tests in Rust","archived":false,"fork":false,"pushed_at":"2024-11-06T07:32:15.000Z","size":87,"stargazers_count":4,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-19T05:26:14.850Z","etag":null,"topics":["mathematics","rust","stationarity-test","statistics","time-series","unit-root-test"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ssoudan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-25T01:51:58.000Z","updated_at":"2025-04-24T01:26:35.000Z","dependencies_parsed_at":"2023-10-11T02:27:40.243Z","dependency_job_id":"1147504b-1fcb-49ac-bbac-ad5ec14ae7ae","html_url":"https://github.com/ssoudan/unit-root","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"770f4467b6129c53f4aa4e6d05a9c989ac7f992e"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ssoudan/unit-root","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoudan%2Funit-root","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoudan%2Funit-root/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoudan%2Funit-root/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoudan%2Funit-root/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssoudan","download_url":"https://codeload.github.com/ssoudan/unit-root/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoudan%2Funit-root/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274026690,"owners_count":25209739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mathematics","rust","stationarity-test","statistics","time-series","unit-root-test"],"created_at":"2025-01-02T13:36:45.499Z","updated_at":"2025-09-07T10:32:36.934Z","avatar_url":"https://github.com/ssoudan.png","language":"Rust","readme":"# Unit root tests in Rust\n\n![Build](https://github.com/ssoudan/unit-root/actions/workflows/rust.yml/badge.svg)\n\n## Description\n\nStationarity tests for time-series data in Rust. \n\nAt the moment:\n[Dickey-Fuller test](https://en.wikipedia.org/wiki/Dickey–Fuller_test) and \n[Augmented Dickey-Fuller test](https://en.wikipedia.org/wiki/Augmented_Dickey–Fuller_test) with no constan no trend, constant or constant and trend.\n\n## License \n\nThis project is licensed under the terms of the Apache License 2.0.\n\n## Usage\n\nAugmented Dickey-Fuller test:\n\n```rust\nuse unit_root::prelude::distrib::{AlphaLevel,Regression};\nuse unit_root::prelude::nalgebra::DVector;\nuse unit_root::prelude::*;\n\nfn main() {\n    let y = DVector::from_row_slice(\u0026[\n        -0.89642362,\n        0.3222552,\n        -1.96581989,\n        -1.10012936,\n        -1.3682928,\n        1.17239875,\n        2.19561259,\n        2.54295031,\n        2.05530587,\n        1.13212955,\n        -0.42968979,\n    ]);\n\n    let lag = 2;\n    \n    // compute the test statistic\n    let regression = Regression::Constant;\n    let report = tools::adf_test(\u0026y, lag, regression).unwrap();\n\n    // critical values for the model with a constant but no trend:\n    let critical_value: f32 = distrib::dickeyfuller::get_critical_value(\n        regression,\n        report.size,\n        AlphaLevel::OnePercent,\n    )\n    .unwrap();\n    assert_eq!(report.size, 8);\n\n    // comparison\n    let t_stat = report.test_statistic;\n    println!(\"t-statistic: {}\", t_stat);\n    println!(\"critical value: {}\", critical_value);\n}\n```\n\nSee [examples](examples/) for more.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssoudan%2Funit-root","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssoudan%2Funit-root","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssoudan%2Funit-root/lists"}