{"id":32204390,"url":"https://github.com/daandejongen/hystar","last_synced_at":"2026-02-18T21:03:10.665Z","repository":{"id":51613719,"uuid":"515260063","full_name":"daandejongen/hystar","owner":"daandejongen","description":"R package that simulates and estimates the hystar model","archived":false,"fork":false,"pushed_at":"2023-12-19T10:34:36.000Z","size":5171,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-17T04:05:01.592Z","etag":null,"topics":["autoregression","estimation","hysteresis","simulation","statistics","threshold","time-series-analysis"],"latest_commit_sha":null,"homepage":"https://daandejongen.github.io/hystar/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daandejongen.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-07-18T16:26:00.000Z","updated_at":"2023-11-23T13:03:13.000Z","dependencies_parsed_at":"2023-01-28T13:27:22.176Z","dependency_job_id":"8781472d-8f02-4bf5-851a-8212c9904bb5","html_url":"https://github.com/daandejongen/hystar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daandejongen/hystar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daandejongen%2Fhystar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daandejongen%2Fhystar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daandejongen%2Fhystar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daandejongen%2Fhystar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daandejongen","download_url":"https://codeload.github.com/daandejongen/hystar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daandejongen%2Fhystar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29596126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T20:59:56.587Z","status":"ssl_error","status_checked_at":"2026-02-18T20:58:41.434Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["autoregression","estimation","hysteresis","simulation","statistics","threshold","time-series-analysis"],"created_at":"2025-10-22T04:54:43.411Z","updated_at":"2026-02-18T21:03:10.647Z","avatar_url":"https://github.com/daandejongen.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# hystar \u003ca href=\"https://daandejongen.github.io/hystar/\"\u003e\u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"139\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n[![R-CMD-check](https://github.com/daandejongen/hystar/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/daandejongen/hystar/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/daandejongen/hystar/branch/master/graph/badge.svg)](https://app.codecov.io/gh/daandejongen/hystar?branch=master)\n\u003c!-- badges: end --\u003e\n\n## Overview\n\nWith the R-package [`hystar`](https://cran.r-project.org/package=hystar), you can simulate data from the hysteretic threshold autoregressive (HysTAR) model, and estimate its parameters. It comes with three functions: \n\n* `hystar_fit`, to **estimate** the HysTAR parameters with the **conditional least squares** method, using your own data or simulated data,\n\n* `z_sim`, to simulate a **threshold variable**,\n\n* `hystar_sim`, to simulate an **outcome variable**.\n\nResults from the time series analysis can be assessed with the standard methods in R, like `plot`, `summary` and `print`. Additionally, you can extract the predictive residuals with the `residuals`-method for further analysis.\n\n## Use\n\nA minimal example:\n\n```{r}\nlibrary(hystar)\ncontrol_variable \u003c- z_sim(n_t = 100)\nsimulated_hystar_model \u003c- hystar_sim(z = control_variable)\nfitted_hystar_model \u003c- hystar_fit(data = simulated_hystar_model$data)\nsummary(fitted_hystar_model)\n```\n\n## Install\n\nFor the current [CRAN release](https://cran.r-project.org/package=hystar) (1.0.0): \n\n```\ninstall.packages(\"hystar\")\n```\n\nFor the development version (1.2.0.9000):\n\n```\ndevtools::install_github(\"daandejongen/hystar\")\n```\n\n## Cite\n\nIf you have used this package for an scientific publication, please cite it with:\n\nDe Jong, D. (2022). _hystar: Simulation and Estimation of the Hysteretic TAR Model_. R package version 1.2.0, \u003chttps://github.com/daandejongen/hystar/\u003e.\n\nBibTeX:\n```\n@Manual{,\n    title = {hystar: Simulation and Estimation of the Hysteretic TAR Model},\n    author = {Daan {de Jong}},\n    year = {2022},\n    note = {R package version 1.2.0},\n    url = {https://github.com/daandejongen/hystar/},\n  }\n```\n\n## Get more info\n\nFor more information about the package, see the [`hystar` website](https://daandejongen.github.io/hystar/).\n\nIf you want to read more about the HysTAR model itself, see the paper with the original proposal of the HysTAR model in Biometrika ([Li, Guan, Li and Yu (2015)](https://academic.oup.com/biomet/article-abstract/102/3/717/2365298?login=false)). Or, for a mathematically more accessible introduction, see [the paper](https://osf.io/preprints/psyarxiv/zrcft) (pre-print) I wrote about detecting hysteresis with the HysTAR model in psychological time series.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaandejongen%2Fhystar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaandejongen%2Fhystar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaandejongen%2Fhystar/lists"}