robnptests -- An R package for robust two-sample location and dispersion tests
robnptests -- An R package for robust two-sample location and dispersion tests - Published in JOSS (2023)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in JOSS metadata -
○Academic publication links
-
✓Committers with academic emails
3 of 7 committers (42.9%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Repository
Robust two-sample tests for the location problem
Basic Info
- Host: GitHub
- Owner: s-abbas
- License: gpl-2.0
- Language: R
- Default Branch: main
- Size: 1.32 MB
Statistics
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
robnptests
The R package robnptests contains different robust and nonparametric tests for the two-sample location problem. The tests allow for comparisons of either the location or the scale parameters of two random samples.
Installation
The released version of robnptests can be installed from CRAN with
{r}
install.packages("robnptests")
To install the development version, the devtools package is required:
``` r if (!require("devtools")) { install.packages("devtools") }
devtools::install_github("s-abbas/robnptests")
library(robnptests) ```
Scope and Usage
The robust and nonparametric tests in this R package follow the construction principle of the popular t-test: A robust estimate for the location difference of the two samples is divided by a robust estimate of scale. The p-values can either be computed using the permutation principle, the randomization principle, or the asymptotic distribution of the estimators. If the principle to compute the p-value is not specified by the user, it will be selected automatically depending on the sample size. The functions used to compute the location and scale estimates are also made available to the user.
The following list shows the currently implemented tests in the package:
- tests based on the median (
med_test), the one-sample Hodges-Lehmann estimator (hl1_test), and the two-sample Hodges-Lehmann estimator (hl2_test), scaled by robust estimators - Yuen's t-test (
trimmed_test) - tests based on the Huber-, Hampel- or Bisquare-M-estimator (
m_test).
Even though the test statistics compare location estimates of the samples, they can be used to identify scale differences.
This is achieved by setting the argument scale.test = TRUE, with which the observations in the samples are log-transformed so that scale differences between the original samples correspond to location differences in the transformed samples.
Details on the tests and references can be found on the help pages of the functions and the vignette vignette("robnptests").
Example 1: Asymptotic test for location difference using the two-sample Hodges-Lehmann estimator
``` r set.seed(121) x <- rnorm(50); y <- rnorm(50)
hl2_test(x, y, method = "asymptotic")
Asymptotic test based on HL2-estimator
data: x and y
D = 1.0916, p-value = 0.275
alternative hypothesis: true location shift is not equal to 0
sample estimates:
HL2 of x and y
0.2048249
```
Example 2: Asymptotic test for scale difference using the two-sample Hodges-Lehmann estimator
``` r hl2_test(x, y, method = "asymptotic", scale.test = TRUE)
Asymptotic test based on HL2-estimator
data: x and y
S = -0.24094, p-value = 0.8096
alternative hypothesis: true ratio of variances is not equal to 1
sample estimates:
HL2 of log(x^2) and log(y^2)
-0.1040422
```
Contributions
We are grateful for any contribution to the further development of the R package. If you experience any problems using the package or have suggestions for new features, please open an issue in the issue tracker. Please consult our contribution guidelines before submitting a pull request.
JOSS Publication
robnptests -- An R package for robust two-sample location and dispersion tests
Authors
Tags
robust statistics nonparametric statisticsGitHub Events
Total
Last Year
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| s-abbas | s****s@t****e | 290 |
| b-brune | b****e@s****e | 44 |
| b-brune | b****e@t****e | 34 |
| Barbara Brune | b****e@t****t | 13 |
| b-brune | b****e@a****t | 6 |
| = | = | 4 |
| Mehmet Hakan Satman | m****n@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 1
- Total pull requests: 8
- Average time to close issues: 28 days
- Average time to close pull requests: about 17 hours
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 2.0
- Average comments per pull request: 0.13
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- mingzehuang (1)
Pull Request Authors
- s-abbas (7)
- jbytecode (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 227 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: robnptests
Robust Nonparametric Two-Sample Tests for Location/Scale
- Homepage: https://github.com/s-abbas/robnptests
- Documentation: http://cran.r-project.org/web/packages/robnptests/robnptests.pdf
- License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
-
Latest release: 1.1.0
published about 3 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 4.0.0 depends
- Rdpack * imports
- checkmate * imports
- gtools * imports
- robustbase * imports
- statmod * imports
- stats * imports
- utils * imports
- covr * suggests
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests
- usethis * suggests
- actions/checkout v2 composite
- actions/upload-artifact v1 composite
- openjournals/openjournals-draft-action master composite
