{"id":18016274,"url":"https://github.com/egarpor/rotasym","last_synced_at":"2026-02-28T13:34:03.399Z","repository":{"id":47665798,"uuid":"185946330","full_name":"egarpor/rotasym","owner":"egarpor","description":"Tests for rotational symmetry on the hypersphere. Software companion for \"On optimal tests for rotational symmetry against new classes of hyperspherical distributions\"","archived":false,"fork":false,"pushed_at":"2025-07-27T21:07:00.000Z","size":36038,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-29T04:37:21.321Z","etag":null,"topics":["circular-statistics","directional-statistics","goodness-of-fit","r","semiparametric","statistics"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egarpor.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-05-10T08:05:40.000Z","updated_at":"2025-07-27T21:07:05.000Z","dependencies_parsed_at":"2025-07-15T14:55:18.961Z","dependency_job_id":"9feafd96-61e3-4068-b1bc-99760e123653","html_url":"https://github.com/egarpor/rotasym","commit_stats":{"total_commits":53,"total_committers":2,"mean_commits":26.5,"dds":"0.37735849056603776","last_synced_commit":"cfa041b6aab2ce6895ea419d5f9bdd26af69bc60"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/egarpor/rotasym","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egarpor%2Frotasym","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egarpor%2Frotasym/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egarpor%2Frotasym/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egarpor%2Frotasym/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egarpor","download_url":"https://codeload.github.com/egarpor/rotasym/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egarpor%2Frotasym/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29935373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:16:57.922Z","status":"ssl_error","status_checked_at":"2026-02-28T13:11:15.149Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["circular-statistics","directional-statistics","goodness-of-fit","r","semiparametric","statistics"],"created_at":"2024-10-30T04:16:55.175Z","updated_at":"2026-02-28T13:34:03.364Z","avatar_url":"https://github.com/egarpor.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput:\n  md_document:\n    variant: gfm\n---\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE, comment = \"#\u003e\", fig.path = \"README/README-\",\n  message = FALSE, warning = FALSE, fig.asp = 1, fig.align = 'center'\n)\n```\n\nrotasym\n=======\n\n```{r, echo = FALSE, results = 'asis'}\ncat(\n  badger::badge_license(license = \"GPLv3\", color = \"blue\",\n                        url = \"https://www.gnu.org/licenses/gpl-3.0\"),\n  badger::badge_github_actions(action = \"R-CMD-check\"),\n  badger::badge_cran_release(color = \"green\"),\n  badger::badge_cran_download(pkg = NULL, type = \"grand-total\"),\n  badger::badge_cran_download(pkg = NULL, type = \"last-month\")\n)\n```\n\n\u003c!-- \u003cimg src=\"\" alt=\"rotasym  hexlogo\" align=\"right\" width=\"200\" style=\"padding: 0 15px; float: right;\"/\u003e --\u003e\n\n## Overview\n\nSoftware companion for the paper \"*On optimal tests for rotational symmetry against new classes of hyperspherical distributions*\" (García-Portugués, Paindaveine and Verdebout, 2020). It implements the proposed tests for rotational symmetry of hyperspherical data and allows to replicate the data application presented.\n\n## Installation\n\nGet the released version from CRAN:\n\n```{r, install-CRAN, eval = FALSE}\n# Install the package\ninstall.packages(\"rotasym\")\n\n# Load package\nlibrary(rotasym)\n```\n\nAlternatively, get the latest version from GitHub:\n\n```{r, install-GitHub, eval = FALSE}\n# Install the package\nlibrary(devtools)\ninstall_github(\"egarpor/rotasym\")\n\n# Load package\nlibrary(rotasym)\n```\n\n```{r, load, echo = FALSE}\n# Load package\nlibrary(rotasym)\n```\n\n## Tests usage\n\nThe following are some simple examples of the usage of the main function of the package, `test_rotasym`, with simulated data. More examples are available in `?test_rotasym`.\n\n```{r, sample}\n# Sample data from a vMF (rotational symmetric distribution about mu)\nn \u003c- 200\np \u003c- 10\ntheta \u003c- c(1, rep(0, p - 1))\nset.seed(123456789)\ndata_0 \u003c- r_vMF(n = n, mu = theta, kappa = 1)\n```\n\n### Specified-θ case\n\n```{r, specified}\n# theta known\ntest_rotasym(data = data_0, theta = theta, type = \"sc\")\ntest_rotasym(data = data_0, theta = theta, type = \"loc_vMF\")\ntest_rotasym(data = data_0, theta = theta, type = \"hyb_vMF\")\n```\n\n### Unspecified-θ case\n\n```{r, unspecified}\n# theta unknown (employs the spherical mean as estimator)\ntest_rotasym(data = data_0, type = \"sc\")\ntest_rotasym(data = data_0, type = \"loc_vMF\")\ntest_rotasym(data = data_0, type = \"hyb_vMF\")\n```\n\n## Data application: test for the rotational symmetry of sunspots\n\nThe data application in García-Portugués, Paindaveine and Verdebout (2020) can\nbe replicated through the script [sunspots-births.R](https://github.com/egarpor/rotasym/blob/master/data-raw/sunspots-births.R) (data gathering and preprocessing) and the code snippet below.\n\n```{r, sunspots_births, fig.show = 'hold'}\n# Load data\ndata(\"sunspots_births\")\nsunspots_births$X \u003c-\n  cbind(cos(sunspots_births$phi) * cos(sunspots_births$theta),\n        cos(sunspots_births$phi) * sin(sunspots_births$theta),\n        sin(sunspots_births$phi))\n\n# Test rotational symmetry for the 23rd cycle\nsunspots_23 \u003c- subset(sunspots_births, cycle == 23)\ntest_rotasym(data = sunspots_23$X, type = \"sc\", theta = c(0, 0, 1))\ntest_rotasym(data = sunspots_23$X, type = \"loc\", theta = c(0, 0, 1))\ntest_rotasym(data = sunspots_23$X, type = \"hyb\", theta = c(0, 0, 1))\n\n# Test rotational symmetry for the 22nd cycle\nsunspots_22 \u003c- subset(sunspots_births, cycle == 22)\ntest_rotasym(data = sunspots_22$X, type = \"sc\", theta = c(0, 0, 1))\ntest_rotasym(data = sunspots_22$X, type = \"loc\", theta = c(0, 0, 1))\ntest_rotasym(data = sunspots_22$X, type = \"hyb\", theta = c(0, 0, 1))\n\n# More analyses in ?sunspots_births\nexample(\"sunspots_births\")\n```\n\n## References\n\nGarcía-Portugués, E., Paindaveine, D., and Verdebout, T. (2020). On optimal tests for rotational symmetry against new classes of hyperspherical distributions. *Journal of the American Statistical Association*, 115(532):1873--1887. [doi:10.1080/01621459.2019.1665527](https://doi.org/10.1080/01621459.2019.1665527).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegarpor%2Frotasym","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegarpor%2Frotasym","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegarpor%2Frotasym/lists"}