Skip to content

spsurv

1.1.0Package record

Bernstein Polynomial Based Semiparametric Survival Analysis

0packages depend
1.6Kdownloads / year
88.7%test coverage
10/13flavors OK

Overview

About

Semiparametric survival analysis based on Bernstein polynomials. 'spsurv' includes proportional hazards, proportional odds and accelerated failure time frameworks for right-censored data. RV Panaro (2020) doi:10.48550/arXiv.2003.10548.

Changes in 1.1.0
  • **CRAN resubmission:** Maintainer contact updated to rvpanaro@gmail.com; license is GPL-3 (removed the bundled LICENSE copy of the GPL); Authors@R roles reviewed (single maintainer; thesis advisors listed as ths, with rev for code review feedback); package Description citation updated to <doi:10.48550/arXiv.2003.10548>; set Config/rstantools/auto_config: FALSE and ship committed Stan C++ exports (no install-time configure/rstan_config(), avoiding Windows R-devel rstan.dll load failures); added RcppParallel and synced src/Makevars.win TBB flags with Unix Makevars; restored covr, rsample, and rsurv in Suggests for optional tests referenced in tests/.
  • **Inference robustness:** .spbp_gamma_information_diagnostics() no longer calls qr() on non-finite gamma information matrices; vcov()/survfit() return NA uncertainty with a warning when that block is unavailable.
Show all changes in 1.1.0Hide the rest of the changes in 1.1.0
  • **tidymodels:** parsnip engines spsurv (MLE) and spsurv_bayes for proportional_hazards(), new proportional_odds(), and survival_reg(); bp_survival_reg() convenience constructor; workflow / predict(type = "survival") support.
  • **tidybayes:** as_draws_df.spbp(), spread_surv_draws.spbp(), and S3 hooks for tidy_draws / spread_draws / gather_draws on Bayes fits; posterior draw indices (.chain, .iteration, .draw).
  • **Prediction:** censored-style predict.spbp() types (survival, time, linear_pred); augment.spbp().
  • **Vignette:** vignette("tidymodels").
  • **Inference:** vcov.spbp() no longer applies a diagonal ridge (polish removed); beta standard errors are unchanged when the Bernstein block is stable and no longer inflated when it is ill-conditioned.
  • **Summary:** summary.spbp() now includes a coef_interval component (Wald for MLE, HPD for Bayes) and prints it when show_intervals = TRUE.
  • **Repository:** paper workflow moved from inst/ to paper/ (excluded from the package tarball).
  • **Dependencies:** trimmed Suggests to packages used in vignettes, tests, or optional integrations. devtools and roxygen2 are not listed in Suggests.

From NEWS.md in the release

Install

Health

CRAN checks
3ERROR10OK
Check messages
ERRORtestsr-oldrel-macos-x86_64, r-oldrel-windows-x86_64, r-release-macos-x86_64

r-oldrel-macos-x86_64

Running ‘testthat.R’ [33s/94s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(parsnip)
  > library(generics)
  
  Attaching package: 'generics'
  
  The following objects are masked from 'package:base':
  
      as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
      setequal, union
  
  > library(spsurv)
  Loading required package: survival
  Loading required package: coda
  > veteran <- survival::veteran
  > 
  > test_check("spsurv")
  
  SAMPLING FOR MODEL 'spbp' NOW (CHAIN 1).
  Chain 1: 
  Chain 1: Gradient evaluation took 9e-05 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.9 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: WARNING: No variance estimation is
  Chain 1:          performed for num_warmup < 20
  Chain 1: 
  Chain 1: Iteration: 1 / 10 [ 10%]  (Warmup)
  Chain 1: Iteration: 2 / 10 [ 20%]  (Warmup)
  Chain 1: Iterati
...[truncated]...
. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. ├─stats::vcov(fit, bp.param = TRUE)
   10. └─spsurv:::vcov.spbp(fit, bp.param = TRUE)
   11.   └─spsurv:::.spbp_sym_inv(Schur_A)
  ── Error ('test-vcov.R:166:3'): ill-conditioned gamma warning appears only for survfit, not after fit ──
  Error: symmetric inverse requires a finite numeric matrix
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(vcov(fit)) at test-vcov.R:166:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. ├─stats::vcov(fit)
   10. └─spsurv:::vcov.spbp(fit)
   11.   └─spsurv:::.spbp_sym_inv(Schur_A)
  
  [ FAIL 3 | WARN 46 | SKIP 1 | PASS 672 ]
  Error:
  ! Test failures.
  Execution halted

r-oldrel-windows-x86_64

Running 'testthat.R' [57s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(parsnip)
  > library(generics)
  
  Attaching package: 'generics'
  
  The following objects are masked from 'package:base':
  
      as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
      setequal, union
  
  > library(spsurv)
  Loading required package: survival
  Loading required package: coda
  > veteran <- survival::veteran
  > 
  > test_check("spsurv")
  
  SAMPLING FOR MODEL 'spbp' NOW (CHAIN 1).
  Chain 1: 
  Chain 1: Gradient evaluation took 0.00011 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 1.1 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: WARNING: No variance estimation is
  Chain 1:          performed for num_warmup < 20
  Chain 1: 
  Chain 1: Iteration: 1 / 10 [ 10%]  (Warmup)
  Chain 1: Iteration: 2 / 10 [ 20%]  (Warmup)
  Chain 1: Iteration
...[truncated]...
0
  factor(celltype)large        0.097 0.097   0.1
  
  --- 
  DIC = 2885   WAIC = -1443 
  [ FAIL 1 | WARN 52 | SKIP 1 | PASS 685 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • Set SPSURV_RUN_COVERAGE=true to run coverage check (1): 'test-coverage.R:6:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-interval.R:18:3'): confint with custom level ───────────────────
  Error in `array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), NULL) else NULL)`: 'data' must be of a vector type, was 'NULL'
  Backtrace:
      ▆
   1. ├─stats::confint(fit, level = 0.9) at test-interval.R:18:3
   2. └─spsurv:::confint.spbp(fit, level = 0.9)
   3.   ├─base::diag(as.matrix(vcov(object)))
   4.   ├─base::as.matrix(vcov(object))
   5.   └─base::as.matrix.default(vcov(object))
   6.     └─base::array(...)
  
  [ FAIL 1 | WARN 52 | SKIP 1 | PASS 685 ]
  Error:
  ! Test failures.
  Execution halted

r-release-macos-x86_64

Running ‘testthat.R’ [32s/63s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(parsnip)
  > library(generics)
  
  Attaching package: 'generics'
  
  The following objects are masked from 'package:base':
  
      as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
      setequal, union
  
  > library(spsurv)
  Loading required package: survival
  Loading required package: coda
  > veteran <- survival::veteran
  > 
  > test_check("spsurv")
  
  SAMPLING FOR MODEL 'spbp' NOW (CHAIN 1).
  Chain 1: 
  Chain 1: Gradient evaluation took 6.3e-05 seconds
  Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.63 seconds.
  Chain 1: Adjust your expectations accordingly!
  Chain 1: 
  Chain 1: 
  Chain 1: WARNING: No variance estimation is
  Chain 1:          performed for num_warmup < 20
  Chain 1: 
  Chain 1: Iteration: 1 / 10 [ 10%]  (Warmup)
  Chain 1: Iteration: 2 / 10 [ 20%]  (Warmup)
  Chain 1: Iter
...[truncated]...
. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. ├─stats::vcov(fit, bp.param = TRUE)
   10. └─spsurv:::vcov.spbp(fit, bp.param = TRUE)
   11.   └─spsurv:::.spbp_sym_inv(Schur_A)
  ── Error ('test-vcov.R:166:3'): ill-conditioned gamma warning appears only for survfit, not after fit ──
  Error: symmetric inverse requires a finite numeric matrix
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(vcov(fit)) at test-vcov.R:166:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. ├─stats::vcov(fit)
   10. └─spsurv:::vcov.spbp(fit)
   11.   └─spsurv:::.spbp_sym_inv(Schur_A)
  
  [ FAIL 3 | WARN 46 | SKIP 1 | PASS 672 ]
  Error:
  ! Test failures.
  Execution halted

CRAN check page ↗

Slowest check: 15.7 min · r-oldrel-macos-x86_64
Status changes
  • ERROR10 OK, 3 ERRORNow
  • ERROR4 OK, 2 ERROR2026-09-29
  • OK6 OK2026-09-28
  • NOTE9 OK, 4 NOTE2026-06-09
  • ERROR9 OK, 3 NOTE, 1 ERROR2026-06-08
  • NOTE7 OK, 7 NOTE2026-04-22
Show 2 earlier changesHide 2 earlier changes
  • ERROR6 OK, 7 NOTE, 1 ERROR2026-04-18
  • NOTE7 OK, 7 NOTE2026-03-10
Advisories

none known

Documentation

In release 1.1.0
READMEYes · 426 wordsVignettesYes · 8 · evaluation depends on the environmentNEWSYes · 100% structured · mentions 1.1.0Citation fileNoWebsiteYes · pkgdown
Help pages
54 (10 internal)includes a package overview page
Examples that run
83%10 run in a plain check · 2 never run
Exported functions with examples
32%
Documented parameters
71%
Return-value docs
73%
Help pages citing references
2%

Downloads

1.6K
CRAN downloads in the past year
Rank #25,287 · ~4/day · ~136/mo
Daily download trend is not available in this view yet.
31730 days
31790 days
1.6K1 year
Compare downloads with other packages →
Also on500 r2u7 autocran

Repository

5Stars
0Forks
0Open issues
0Open PRs
0Releases
133Commits
8Commit identities
survival-analysisr-packagebernstein-polynomialrstansurvival-regressionrstats-packagecran-r
133 commits · Last activity 2026-10-04
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
508
Median days to close, 50 most recently updated closed PRs
0

Issues over time

2026-09-28 · 12026-09-30 · 0
PracticesBeta

9 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/rvpanaro/spsurv on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-10-04 · The repository has a site deploy workflow

pkgdown site last built 2026-10-04

Coverage (1)
Coverage reporting (Codecov)
CRAN release process (2)
cran-comments.mdrevdep/
Show all practicesHide 1 practice
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
26 external dependencies (excludes base and recommended)

Installing spsurv adds 49 packages (22 with compiled code, 46 MB of source tarballs). Heaviest: BH 14 MB, ggplot2 6.0 MB, viridis 2.9 MB.

Depends (3)
R >= 4.1.0survivalcoda
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (3)
Author, Maintainer since 1.0.0 (2020), Copyright holder
https://rvpanaro.github.io/
Thesis advisor, Reviewer
http://www.est.ufmg.br/~fndemarqui/
Thesis advisor · added in 1.1.0
http://www.est.ufmg.br/~vdinizm/
Listed in earlier versions (1)
Vinícius Mayrink
no longer listed · 1.0.0
Releases (2)

Pick two releases to compare their code metrics.

  • unarchivedReturned to CRAN
    2026-09-28
  • 1.1.0Latest
    record
    2026-09-28 · current release · diff ↗ ·
    removed 9 exports
    coef, confint, extract, itsamp, mode, stan_dens, survivor, traceplot, vcov
    added 17 exports
    as_draws_df.spbp, bernstein, bp_survival_reg, credint, estimates, ggresiduals, proportional_odds, pw.basis, rank_models, se, spread_surv_draws.spbp, spsurv_fit_proportional_hazards, spsurv_fit_proportional_odds, spsurv_fit_survival_reg, spsurv_pred_linear_pred, spsurv_pred_survival, spsurv_pred_time
  • archivedRemoved from CRAN
    2026-06-11
    email to the maintainer is undeliverable
  • 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
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • 1.0.0
    record
    2020-03-31
  • R
    R 3.6.0 released · 2019-04-26

Package metadata

First published
2020-03-31
Total releases
2 / 6 yrs
License
GPL-3 OSI
Minimum R
≥ 4.1.0
Download size
1.1 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("spsurv")
Panaro, R., Demarqui, F., & Mayrink, V. (2026). spsurv: Bernstein Polynomial Based Semiparametric Survival Analysis (Version 1.1.0) [Computer software]. https://doi.org/10.32614/CRAN.package.spsurv

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for spsurv version 1.1.0 [Data set]. HJJB, LLC. Data release v2026-10-19. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-19, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy