safestats
0.8.7Safe Anytime-Valid Inference
Overview
Functions to design and apply tests that are anytime valid. The functions can be used to design hypothesis tests in the prospective/randomised control trial setting or in the observational/retrospective setting. The resulting tests remain valid under both optional stopping and optional continuation. The current version includes safe t-tests and safe tests of two proportions. For details on the theory of safe tests, see Grunwald, de Heide and Koolen (2019) "Safe Testing" arXiv:1906.07801, for details on safe logrank tests see ter Schure, Perez-Ortiz, Ly and Grunwald (2020) "The Safe Logrank Test: Error Control under Continuous Monitoring with Unlimited Horizon" arXiv:2011.06931v3 and Turner, Ly and Grunwald (2021) "Safe Tests and Always-Valid Confidence Intervals for contingency tables and beyond" arXiv:2106.02693 for details on safe contingency table tests.
Install
Health
- NOTE r-devel-linux-x86_64-debian-clang
- NOTE r-devel-linux-x86_64-debian-gcc
- NOTE2026-06-0911 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-06-0811 OK · 1 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
- NOTE2026-03-1012 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- References docs
- 3%
Downloads
Dependencies
Nothing depends on this yet.
Code & Tests
- Cyclomatic complexity
- 5.0 median / 54 max
- Test cases
- 17 / 0.03 per code line
Test coverage
Line coverage
16%
Expression
18.3%
Tests / Examples
16.5% / 70% ex
Functions
91 53 exported
Complexity
8.7 avg / 54 max
Call network
91 nodes / 134 edges
Call graph
Open call graph →Lowest coverage
91 functions| Function | Cyclo | Coverage |
|---|---|---|
| checkDoubleArgumentsDesignObject exp | 4 | 0% |
| computeBetaSafeT exp | 7 | 0% |
| computeBetaSafeZ exp | 7 | 0% |
| computeBootObj exp | 17 | 0% |
| computeConfidenceBoundForLogOddsTwoProportions exp | 2 | 0% |
| computeConfidenceBoundsForDifferenceTwoProportions exp | 1 | 0% |
People & History
2 releases. Pick two to compare their code metrics. R releases are shown for context.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.8.7Latest
- RR 4.2.0 released · 2022-04-22
- 0.8.62022-02-01
- RR 4.1.0 released · 2021-05-18
Package metadata
- First published
- 2022-02-01
- Total releases
- 2 / 4 yrs
- License
- LGPL (>= 3) OSI
- Minimum R
- ≥ 3.6
- Download size
- 3.0 MB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet