Compute Buishand Range Test, Pettit Test, SNHT, Student t-test, and Mann-Whitney Rank Test, to identify breakpoints in series. For all functions NA is allowed. Since all of the mention methods identify only one breakpoint in a series, a general function to look for N breakpoint is given. Also, the Yamamoto test for climate jump is available. Alexandersson, H. (1986) <doi:10.1002/joc.3370060607>, Buishand, T. (1982) <doi:10.1016/0022-1694(82)90066-X>, Hurtado, S. I., Zaninelli, P. G., & Agosta, E. A. (2020) <doi:10.1016/j.atmosres.2020.104955>, Mann, H. B., Whitney, D. R. (1947) <doi:10.1214/aoms/1177730491>, Pettitt, A. N. (1979) <doi:10.2307/2346729>, Ruxton, G. D., jul (2006) <doi:10.1093/beheco/ark016>, Yamamoto, R., Iwashima, T., Kazadi, S. N., & Hoshiai, M. (1985) <doi:10.2151/jmsj1965.63.6_1157>.
This package contains all of the functions necessary for the complete analysis of a continuous glucose monitoring study and can be applied to data measured by various existing CGM devices such as FreeStyle Libre', Glutalor', Dexcom and Medtronic CGM'. It reads a series of data files, is able to convert various formats of time stamps, can deal with missing values, calculates both regular statistics and nonlinear statistics, and conducts group comparison. It also displays results in a concise format. Also contains two unique features new to CGM analysis: one is the implementation of strictly standard mean difference and the class of effect size; the other is the development of a new type of plot called antenna plot. It corresponds to Zhang XD'(2018)<doi:10.1093/bioinformatics/btx826>'s article CGManalyzer: an R package for analyzing continuous glucose monitoring studies'.
This package provides a publication-ready toolkit for modern survival and competing risks analysis with a minimal, formula-based interface. Both nonparametric estimation and direct polytomous regression of cumulative incidence functions (CIFs) are supported. The main functions cifcurve()', cifplot()', and cifpanel() estimate survival and CIF curves and produce high-quality graphics with risk tables, censoring and competing-risk marks, and multi-panel or inset layouts built on ggplot2 and ggsurvfit'. The modeling function polyreg() performs direct polytomous regression for coherent joint modeling of all cause-specific CIFs to estimate risk ratios, odds ratios, or subdistribution hazard ratios at user-specified time points. All core functions adopt a formula-and-data syntax and return tidy and extensible outputs that integrate smoothly with modelsummary', broom', and the broader tidyverse ecosystem. Key numerical routines are implemented in C++ via Rcpp'.
Sizes field experiments from uniformity-trial data, following the relationship between the coefficient of variation and plot size. Checks a trial for the spatial structure the sizing methods assume (semivariogram, Moran's I, kriged field map), summarises the coefficient of variation over every plot shape the grid admits, and estimates the optimal plot size by the modified maximum curvature method of Meier and Lessman (1971), by the linear response plateau (LRP) and quadratic response plateau (QRP) models, and by the closed form of Paranaiba, Ferreira and Morais (2009), which can be compared side by side. From the coefficient of variation at the optimum it derives the number of replications needed to detect a given difference between treatment means, as in Cargnelutti Filho and others (2014). Every method returns standardised diagnostic statistics, optional bootstrap uncertainty for the breakpoint, and publication-style plots.
This package provides tools for the analysis and visualization of animal and plant pedigrees. Analytical methods include equivalent complete generations, generation intervals, effective population size (via inbreeding, coancestry, and demographic approaches), founder and ancestor contributions, partial inbreeding, genetic diversity indices, and additive (A), dominance (D), and epistatic (AA) relationship matrices. Core algorithms â ancestry tracing, topological sorting, inbreeding coefficients, and matrix construction â are implemented in C++ ('Rcpp', RcppArmadillo') and data.table', scaling to pedigrees with over one million individuals. Matrix-free pedigree traversals apply additive relationship matrices or their inverses to vectors and matrices without materializing dense square matrices. Pedigree graphs are rendered via igraph with support for compact full-sib family display; relationship matrices can be visualized as heatmaps. Supports complex mating systems, including selfing and pedigrees in which the same individual can appear as both sire and dam.
This package provides a general-purpose toolkit for comparing any two data frames with optional CDISC (Clinical Data Interchange Standards Consortium) validation for clinical trial data. Core comparison functions work on arbitrary datasets: variable-level and observation-level comparison, data type checking, metadata attribute analysis (types, labels, lengths, formats), missing value handling, key-based row matching, tolerance-based numeric comparisons, and group-wise comparisons. Optional z-score outlier detection is available when enabled. When working with clinical data, the package additionally validates SDTM (Study Data Tabulation Model) and ADaM (Analysis Data Model) datasets against CDISC standards (SDTM IG 3.3/3.4, ADaM IG 1.1/1.2/1.3), automatically detecting domains and flagging non-conformant variables. Generates unified comparison reports in text or HTML format with interactive dashboards. For CDISC standards, see <https://www.cdisc.org/standards>.
Calculate Overall Survival or Recurrence-Free Survival for breast cancer patients, using NHS Predict'. The time interval for the estimation can be set up to 15 years, with default at 10. Incremental therapy benefits are estimated for hormone therapy, chemotherapy, trastuzumab, and bisphosphonates. An additional function, suited for SCAN audits, features a more user-friendly version of the code, with fewer inputs, but necessitates the correct standardised inputs. This work is not affiliated with the development of NHS Predict and its underlying statistical model. Details on NHS Predict can be found at: <doi:10.1186/bcr2464>. The web version of NHS Predict': <https://breast.predict.nhs.uk/>. A small dataset of 50 fictional patient observations is provided for the purpose of running examples with the main two functions, and an additional dataset is provided for running example with the dedicated SCAN function.
This package provides estimates for the bivariate and trivariate distribution functions and bivariate and trivariate survival functions for censored gap times. Two approaches, using existing methodologies, are considered: (i) the Lin's estimator, which is based on the extension the Kaplan-Meier estimator of the distribution function for the first event time and the Inverse Probability of Censoring Weights for the second time (Lin DY, Sun W, Ying Z (1999) <doi:10.1093/biomet/86.1.59> and (ii) another estimator based on Kaplan-Meier weights (Una-Alvarez J, Meira-Machado L (2008) <https://w3.math.uminho.pt/~lmachado/Biometria_conference.pdf>). The proposed methods are the landmark estimators based on subsampling approach, and the estimator based on weighted cumulative hazard estimator. The package also provides nonparametric estimator conditional to a given continuous covariate. All these methods have been submitted to be published.
Finds single- and two-arm designs using stochastic curtailment, as described by Law et al. (2022) <doi:10.1080/10543406.2021.2009498> and Law et al. (2021) <doi:10.1002/pst.2067> respectively. Designs can be single-stage or multi-stage. Non-stochastic curtailment is possible as a special case. Desired error-rates, maximum sample size and lower and upper anticipated response rates are inputted and suitable designs are returned with operating characteristics. Stopping boundaries and visualisations are also available. The package can find designs using other approaches, for example designs by Simon (1989) <doi:10.1016/0197-2456(89)90015-9> and Mander and Thompson (2010) <doi:10.1016/j.cct.2010.07.008>. Other features: compare and visualise designs using a weighted sum of expected sample sizes under the null and alternative hypotheses and maximum sample size; visualise any binary outcome design.
Facilitates creation and manipulation of metric graphs, such as street or river networks. Further facilitates operations and visualizations of data on metric graphs, and the creation of a large class of random fields and stochastic partial differential equations on such spaces. These random fields can be used for simulation, prediction and inference. In particular, linear mixed effects models including random field components can be fitted to data based on computationally efficient sparse matrix representations. Interfaces to the R packages INLA and inlabru are also provided, which facilitate working with Bayesian statistical models on metric graphs. The main references for the methods are Bolin, Simas and Wallin (2024) <doi:10.3150/23-BEJ1647>, Bolin, Kovacs, Kumar and Simas (2023) <doi:10.1090/mcom/3929> and Bolin, Simas and Wallin (2023) <doi:10.48550/arXiv.2304.03190> and <doi:10.48550/arXiv.2304.10372>.
Random simulations of fuzzy numbers are still a challenging problem. The aim of this package is to provide the respective procedures to simulate fuzzy random variables, especially in the case of the piecewise linear fuzzy numbers (PLFNs, see Coroianua et al. (2013) <doi:10.1016/j.fss.2013.02.005> for the further details). Additionally, the special resampling algorithms known as the epistemic bootstrap are provided (see Grzegorzewski and Romaniuk (2022) <doi:10.34768/amcs-2022-0021>, Grzegorzewski and Romaniuk (2022) <doi:10.1007/978-3-031-08974-9_39>, Romaniuk et al. (2024) <doi:10.32614/RJ-2024-016>) together with the functions to apply statistical tests and estimate various characteristics based on the epistemic bootstrap. The package also includes real-life datasets of epistemic fuzzy triangular and trapezoidal numbers. The fuzzy numbers used in this package are consistent with the FuzzyNumbers package.
Seq2pathway is a novel tool for functional gene-set (or termed as pathway) analysis of next-generation sequencing data, consisting of "seq2gene" and "gene2path" components. The seq2gene links sequence-level measurements of genomic regions (including SNPs or point mutation coordinates) to gene-level scores, and the gene2pathway summarizes gene scores to pathway-scores for each sample. The seq2gene has the feasibility to assign both coding and non-exon regions to a broader range of neighboring genes than only the nearest one, thus facilitating the study of functional non-coding regions. The gene2pathway takes into account the quantity of significance for gene members within a pathway compared those outside a pathway. The output of seq2pathway is a general structure of quantitative pathway-level scores, thus allowing one to functional interpret such datasets as RNA-seq, ChIP-seq, GWAS, and derived from other next generational sequencing experiments.
Automatically estimate 14 effect size measures from a well-formatted dataset, including Cohen's d, Hedges g, mean difference, odds ratio, risk ratio, incidence rate ratio, risk difference, number needed to treat, Pearson correlation, Fisher's z, Cronbach's alpha, intraclass correlation coefficient, and single-group proportion. Provides a two-tier quality-flag diagnostic system for input validation and post-computation plausibility checks, missing-data guidance that tells users which columns would unlock additional estimators, post-hoc correction for attenuation due to measurement error, and standalone psychometric utilities (standard error of measurement, smallest detectable change, change-score reliability). Various other functions can help, for example, removing dependency between several effect sizes, or identifying differences between two datasets. This package is mainly designed to assist in conducting a systematic review with a meta-analysis but can be useful to any researcher interested in estimating an effect size.
These Rcpp'-based functions compute the efficient score statistics for grouped time-to-event data (Prentice and Gloeckler, 1978), with the optional inclusion of baseline covariates. Functions for estimating the parameter of interest and nuisance parameters, including baseline hazards, using maximum likelihood are also provided. A parallel set of functions allow for the incorporation of family structure of related individuals (e.g., trios). Note that the current implementation of the frailty model (Ripatti and Palmgren, 2000) is sensitive to departures from model assumptions, and should be considered experimental. For these data, the exact proportional-hazards-model-based likelihood is computed by evaluating multiple variable integration. The integration is accomplished using the Cuba library (Hahn, 2005), and the source files are included in this package. The maximization process is carried out using Brent's algorithm, with the C++ code file from John Burkardt and John Denker (Brent, 2002).
Draws circular and linear plasmid maps with grid graphics. Features are shown as colored arcs with optional arrowheads, callout labels that are laid out to avoid overlap, an automatic base-pair scale, and the plasmid name and size. A style is built from a handful of shape parameters, with presets as named combinations of them, and the layout follows the molecule's topology. Maps can be built up feature by feature or imported from GenBank', EMBL', FASTA and SnapGene files, whose format is detected from content rather than file extension. Restriction sites can be located in the sequence and labeled. Ships eight visual styles, including one inspired by the AngularPlasmid JavaScript library, and seven categorical palettes checked for colorblind safety. Palettes from other packages can be used directly, as a color vector or as a palette function, and checked against the same criteria.
Fast, optimal, and reproducible clustering algorithms for circular, periodic, or framed data. The algorithms introduced here are based on a core algorithm for optimal framed clustering the authors have developed (Debnath & Song 2021) <doi:10.1109/TCBB.2021.3077573>. The runtime of these algorithms is O(K N log^2 N), where K is the number of clusters and N is the number of circular data points. On a desktop computer using a single processor core, millions of data points can be grouped into a few clusters within seconds. One can apply the algorithms to characterize events along circular DNA molecules, circular RNA molecules, and circular genomes of bacteria, chloroplast, and mitochondria. One can also cluster climate data along any given longitude or latitude. Periodic data clustering can be formulated as circular clustering. The algorithms offer a general high-performance solution to circular, periodic, or framed data clustering.
Computes the extended spring indices (SI-x) and false spring exposure indices (FSEI). The SI-x indices are standard indices used for analysis in spring phenology studies. In addition, the FSEI is also from research on the climatology of false springs and adjusted to include an early and late false spring exposure index. The indices include the first leaf index, first bloom index, and false spring exposure indices, along with all calculations for all functions needed to calculate each index. The main function returns all indices, but each function can also be run separately. Allstadt et al. (2015) <doi: 10.1088/1748-9326/10/10/104008> Ault et al. (2015) <doi: 10.1016/j.cageo.2015.06.015> Peterson and Abatzoglou (2014) <doi: 10.1002/2014GL059266> Schwarz et al. (2006) <doi: 10.1111/j.1365-2486.2005.01097.x> Schwarz et al. (2013) <doi: 10.1002/joc.3625>.
The C++ header files of the Stan project are provided by this package. There is a shared object containing part of the CVODES library, but it is not accessible from R. r-stanheaders is only useful for developers who want to utilize the LinkingTo directive of their package's DESCRIPTION file to build on the Stan library without incurring unnecessary dependencies.
The Stan project develops a probabilistic programming language that implements full or approximate Bayesian statistical inference via Markov Chain Monte Carlo or variational methods and implements (optionally penalized) maximum likelihood estimation via optimization. The Stan library includes an advanced automatic differentiation scheme, templated statistical and linear algebra functions that can handle the automatically differentiable scalar types (and doubles, ints, etc.), and a parser for the Stan language. The r-rstan package provides user-facing R functions to parse, compile, test, estimate, and analyze Stan models.
This package provides a unified set of heteroscedasticity diagnostics for linear-model workflows. It implements classical auxiliary-regression tests, including those of White (1980) <doi:10.2307/1912934>, Breusch and Pagan (1979) <doi:10.2307/1911963>, Koenker (1981) <doi:10.1016/0304-4076(81)90062-2>, Goldfeld and Quandt (1965) <doi:10.1080/01621459.1965.10480811> and Harvey (1976) <doi:10.2307/1913974>; the score test of Cook and Weisberg (1983) <doi:10.1093/biomet/70.1.1>; the ARCH test of Engle (1982) <doi:10.2307/1912773>; and group-wise tests of equal variance, including those of Bartlett (1937) <doi:10.1098/rspa.1937.0109>, Brown and Forsythe (1974) <doi:10.1080/01621459.1974.10482955> and Hartley (1950) <doi:10.2307/2332383>. Resampling and scalable variants, simulation utilities, diagnostic visualisation and remediation helpers share a consistent interface designed for reproducible statistical workflows and integration with common modelling tools.
Detect feedback loops (cycles, circuits) between species (nodes) in ordinary differential equation (ODE) models. Feedback loops are paths from a node to itself without visiting any other node twice, and they have important regulatory functions. Loops are reported with their order of participating nodes and their length, and whether the loop is a positive or a negative feedback loop. An upper limit of the number of feedback loops limits runtime (which scales with feedback loop count). Model parametrizations and values of the modelled variables are accounted for. Computation uses the characteristics of the Jacobian matrix as described e.g. in Thomas and Kaufman (2002) <doi:10.1016/s1631-0691(02)01452-x>. Input can be the Jacobian matrix of the ODE model or the ODE function definition; in the latter case, the Jacobian matrix is determined using numDeriv'. Graph-based algorithms from igraph are employed for path detection.
Introduces a novel network-constrained survival analysis framework for variable selection and parameter estimation in penalized survival models with convex penalties. The package extends two classical survival models, the Cox Proportional Hazards (PH) model and the Accelerated Failure Time (AFT) model, by incorporating prior biological knowledge from curated interaction networks (e.g., KEGG) into a double-penalty framework. The first penalty enforces variable selection through a LASSO penalty, while the second preserves gene-gene correlations by incorporating Laplacian-based constraints, ensuring that biologically relevant network structures are maintained. Using censored survival data, the method enables the identification of predictive biomarkers and pathways with potential relevance for target therapies. Model estimation is performed via proximal optimization algorithms combined with cross-validation for reliable tuning. To enhance interpretability, dedicated utility functions are implemented to consolidate results, yielding biologically coherent insights that can support personalized medicine and contribute to improved patient outcomes.
This package contains the functions for construction and visualization of underlying and reflexivity graphs of the three families of the proximity catch digraphs (PCDs), see (Ceyhan (2005) ISBN:978-3-639-19063-2), and for computing the edge density of these PCD-based graphs which are then used for testing the patterns of segregation and association against complete spatial randomness (CSR)) or uniformity in one and two dimensional cases. The PCD families considered are Arc-Slice PCDs, Proportional-Edge (PE) PCDs (Ceyhan et al. (2006) <doi:10.1016/j.csda.2005.03.002>) and Central Similarity PCDs (Ceyhan et al. (2007) <doi:10.1002/cjs.5550350106>). See also (Ceyhan (2016) <doi:10.1016/j.stamet.2016.07.003>) for edge density of the underlying and reflexivity graphs of PE-PCDs. The package also has tools for visualization of PCD-based graphs for one, two, and three dimensional data.
Ships statistical and mathematical routines from R internal nmath ('Mathlib') as OpenCL C sources under directory inst/cl/', with R wrappers that use the GPU when OpenCL is available at compile time and fall back to stats equivalents otherwise. Aimed at package developers building custom kernels (for example Bayesian GLMs via suggested package glmbayes') using opencltools kernel loaders and related helpers. Contains translated shims, an illustrative GLM-related kernel subsystem, vignettes, and optional GPU acceleration. The ported routines are translated from the nmath ('Mathlib') and Rmath sources of R Core Team (2026) "R: A Language and Environment for Statistical Computing" <doi:10.32614/R.manuals>. OpenCL GPU execution follows the standard described in Stone, Gohara, and Shi (2010) <doi:10.1109/MCSE.2010.69>. The likelihood subgradient simulation methodology implemented by the illustrative GLM kernel subsystem is described in Nygren and Nygren (2006) <doi:10.1198/016214506000000357>.
Perform inference in the secondary analysis setting with linked data potentially containing mismatch errors. Only the linked data file may be accessible and information about the record linkage process may be limited or unavailable. Implements the General Framework for Regression with Mismatched Data developed by Slawski et al. (2025) <doi:10.1093/jrsssa/qnae083>. The framework uses a mixture model for pairs of linked records whose two components reflect distributions conditional on match status, i.e., correct match or mismatch. Inference is based on composite likelihood and the Expectation-Maximization (EM) algorithm. The package currently supports Cox Proportional Hazards Regression (right-censored data only) and Generalized Linear Regression Models (Gaussian, Gamma, Poisson, and Logistic (binary models only)). Information about the underlying record linkage process can be incorporated into the method if available (e.g., assumed overall mismatch rate, safe matches, predictors of match status, or predicted probabilities of correct matches).