Skip to content

safestats

0.8.7

Safe Anytime-Valid Inference

0packages depend
2.9Kdownloads / year
16.5%test coverage
11/13checks pass

Overview

About
Maintained by Alexander LyFirst published 2022-02-012 releasesCRAN page ↗

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

CRAN checks
2NOTE11OK
Failing flavors
  • NOTE r-devel-linux-x86_64-debian-clang
  • NOTE r-devel-linux-x86_64-debian-gcc
Slowest check: 5.2 min · r-release-windows-x86_64
Code health
Yes
Tests · ratio 0.03
16.5%
Coverage · measured lines
100%
Documentation · exports
8
Dependencies · direct
Check history
  • NOTE2026-06-09
    11 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-06-08
    11 OK · 1 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • NOTE2026-03-10
    12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 20 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
100%
References docs
3%

Downloads

2.9K
CRAN downloads in the past year
Rank #13,788 · ~8/day · ~239/mo
Daily download trend is not available in this view yet.
22530 days
79290 days
2.9K1 year
Compare downloads with other packages →
Also on111 r2u30 autocran

Dependencies

Declared dependencies
8 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.6
Imports (8)
LinkingTo (0)
none
Suggests (4)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

Code Composition
R 7,983 (58%)Rd 4,229 (31%)Vignettes 1,502 (11%)
Code characteristics
Object systems
S37
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

Loading call graph…

Lowest coverage

91 functions
FunctionCycloCoverage
checkDoubleArgumentsDesignObject exp40%
computeBetaSafeT exp70%
computeBetaSafeZ exp70%
computeBootObj exp170%
computeConfidenceBoundForLogOddsTwoProportions exp20%
computeConfidenceBoundsForDifferenceTwoProportions exp10%

People & History

People (5)
Maintainer (1)
Maintainer, Author
Authors (2)
Maintainer, Author
Contributors (3)
Contributor
Package Timeline

2 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 0.8.7Latest
    2022-11-24 · current release · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 0.8.6
    2022-02-01
  • R
    R 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
Report a problem with this page →