Journal of Statistical Software
Not a member yet
1629 research outputs found
Sort by
jti and sparta: Time and Space Efficient Packages for Model-Based Prediction in Large Bayesian Networks
A Bayesian network is a multivariate (potentially very high dimensional) probabilistic model formed by combining lower-dimensional components. In Bayesian networks, the computation of conditional probabilities is fundamental for model-based predictions. This is usually done based on message passing algorithms that utilize conditional independence structures. In this paper, we deal with a specific message passing algorithm that exploits a second structure called a junction tree and hence is known as the junction tree algorithm (JTA). In Bayesian networks for discrete variables with finite state spaces, there is a fundamental problem in high dimensions: A discrete distribution is represented by a table of values, and in high dimensions, such tables can become prohibitively large. In JTA, such tables must be multiplied which can lead to even larger tables. The jti package meets this challenge by using the package sparta by implementing methods that efficiently handle multiplication and marginalization of sparse tables through JTA. The two packages are written in the R programming language and are freely available from the Comprehensive R Archive Network
Interpreting Deep Neural Networks with the Package innsight
The R package innsight offers a general toolbox for revealing variable-wise interpretations of deep neural networks' predictions with so-called feature attribution methods. Aside from the unified and user-friendly framework, the package stands out in three ways: It is generally the first R package implementing feature attribution methods for neural networks. Secondly, it operates independently of the deep learning library, allowing the interpretation of neural networks from any R package, including keras, torch, neuralnet, and even custom models. Despite its flexibility, innsight benefits internally from the torch package's fast and efficient array calculations, which builds on LibTorch - PyTorch's C++ backend - without a Python dependency. Finally, it offers a variety of visualization tools for tabular, signal, image data, or a combination of these. Additionally, the plots can be rendered interactively using the plotly package
Estimating Conditional Distributions with Neural Networks Using R Package deeptrafo
Contemporary empirical applications frequently require flexible regression models for complex response types and large tabular or non-tabular, including image or text, data. Classical regression models either break down under the computational load of processing such data or require additional manual feature extraction to make these problems tractable. Here, we present deeptrafo, a package for fitting flexible regression models for conditional distributions using a tensorflow back end with numerous additional processors, such as neural networks, penalties, and smoothing splines. Package deeptrafo implements deep conditional transformation models (DCTMs) for binary, ordinal, count, survival, continuous, and time series responses, potentially with uninformative censoring. Unlike other available methods, DCTMs do not assume a parametric family of distributions for the response. Further, the data analyst may trade off interpretability and flexibility by supplying custom neural network architectures and smoothers for each term in an intuitive formula interface. We demonstrate how to set up, fit, and work with DCTMs for several response types. We further showcase how to construct ensembles of these models, evaluate models using inbuilt cross-validation, and use other convenience functions for DCTMs in several applications. Lastly, we discuss DCTMs in light of other approaches to regression with non-tabular data
Modeling Nonstationary Financial Volatility with the R Package tvgarch
Certain events can make the structure of volatility of financial returns to change, making it nonstationary. Models of time-varying conditional variance such as generalized autoregressive conditional heteroscedasticity (GARCH) models usually assume stationarity. However, this assumption can be inappropriate and volatility predictions can fail in the presence of structural changes in the unconditional variance. To overcome this problem, in the time-varying (TV-)GARCH model, the GARCH parameters are allowed to vary smoothly over time by assuming not only the conditional but also the unconditional variance to be time-varying. In this paper, we show how useful the R package tvgarch (Campos-Martins and Sucarrat 2023) can be for modeling nonstationary volatility in financial empirical applications. The functions for simulating, testing and estimating TV-GARCH-X models, where additional covariates can be included, are implemented in both univariate and multivariate settings
magi: A Package for Inference of Dynamic Systems from Noisy and Sparse Data via Manifold-Constrained Gaussian Processes
This article presents the magi software package for the inference of dynamic systems. The focus of magi is on dynamics modeled by nonlinear ordinary differential equations with unknown parameters. While such models are widely used in science and engineering, the available experimental data for parameter estimation may be noisy and sparse. Furthermore, some system components may be entirely unobserved. magi solves this inference problem with the help of manifold-constrained Gaussian processes within a Bayesian statistical framework, whereas unobserved components have posed a significant challenge for existing software. We use several realistic examples to illustrate the functionality of magi. The user may choose to use the package in any of the R, MATLAB, and Python environments
openTSNE: A Modular Python Library for t-SNE Dimensionality Reduction and Embedding
One of the most popular techniques for visualizing large, high-dimensional data sets is t-distributed stochastic neighbor embedding (t-SNE). Recently, several extensions have been proposed to address scalability issues and the quality of the resulting visualizations. We introduce openTSNE, a modular Python library that implements the core t-SNE algorithm and its many extensions. The library is faster than existing implementations and can compute projections of data sets containing millions of data points in minutes
bizicount: Bivariate Zero-Inflated Count Copula Regression Using R
Two common issues arise in regression modelling of bivariate count data: (i) dependence across outcomes, and (ii) excess zero counts (i.e., zero inflation). However, there are currently few options to estimate bivariate zero-inflated count regression models in R. Therefore, we present an R package, bizicount, that enables researchers to easily estimate bivariate zero-inflated count copula regression models. By using copulas to model the dependence across outcomes, researchers do not have to make assumptions about the multivariate (and zero-inflated) structure relating their count variables to one another. Instead, they are only required to make familiar assumptions about the marginal distribution of each outcome variable, which should enable wider use of our approach. Below we present our proposed estimator, detail its advantages over existing alternatives, and demonstrate the use of the corresponding functions for bivariate modeling of terrorism data from Nigeria
Extremes.jl: Extreme Value Analysis in Julia
The Extremes.jl package provides exhaustive, high-performance functions by leveraging the multiple-dispatch capabilities in Julia for the analysis of extreme values. In particular, the package implements statistical models for both block maxima and peaks-over-threshold methods, along with several methods for the generalized extreme value and generalized Pareto distributions used in extreme value theory. Additionally, the package offers various parameter estimation methods, such as probability-weighted moments, maximum likelihood, and Bayesian estimation. It also includes tools for handling dependence in excesses over a threshold and methods for managing nonstationary models. Inference for extreme quantiles is available for both stationary and nonstationary models, along with diagnostic figures to assess the goodness of fit of the model to the data
PUMP: Estimating Power, Minimum Detectable Effect Size, and Sample Size When Adjusting for Multiple Outcomes in Multi-Level Experiments
For randomized controlled trials (RCTs) with a single intervention's impact being measured on multiple outcomes, researchers often apply a multiple testing procedure (such as Bonferroni or Benjamini-Hochberg) to adjust p values. Such an adjustment reduces the likelihood of spurious findings, but also changes the statistical power, sometimes substantially. A reduction in power means a reduction in the probability of detecting effects when they do exist. This consideration is frequently ignored in typical power analyses, as existing tools do not easily accommodate the use of multiple testing procedures. We introduce the PUMP (Power Under Multiplicity Project) R package as a tool for analysts to estimate statistical power, minimum detectable effect size, and sample size requirements for multi-level RCTs with multiple outcomes. PUMP uses a simulation-based approach to flexibly estimate power for a wide variety of experimental designs, number of outcomes, multiple testing procedures, and other user choices. By assuming linear mixed effects models, we can draw directly from the joint distribution of test statistics across outcomes and thus estimate power via simulation. One of PUMP's main innovations is accommodating multiple outcomes, which are accounted for in two ways. First, power estimates from PUMP properly account for the adjustment in p values from applying a multiple testing procedure. Second, when considering multiple outcomes rather than a single outcome, different definitions of statistical power emerge. PUMP allows researchers to consider a variety of definitions of power in order to choose the most appropriate types of power for the goals of their study. The package supports a variety of commonly used frequentist multi-level RCT designs and linear mixed effects models. In addition to the main functionality of estimating power, minimum detectable effect size, and sample size requirements, the package allows the user to easily explore sensitivity of these quantities to changes in underlying assumptions
An Extendable Python Implementation of Robust Optimization Monte Carlo
Performing inference in statistical models with an intractable likelihood is challenging, therefore, most likelihood-free inference (LFI) methods encounter accuracy and efficiency limitations. In this paper, we present the implementation of the LFI method robust optimization Monte Carlo (ROMC) in the Python package elfi. ROMC is a novel and efficient (highly-parallelizable) LFI framework that provides accurate weighted samples from the posterior. Our implementation can be used in two ways. First, a scientist may use it as an out-of-the-box LFI algorithm; we provide an easy-to-use API harmonized with the principles of elfi, enabling effortless comparisons with the rest of the methods included in the package. Additionally, we have carefully split ROMC into isolated components for supporting extensibility. A researcher may experiment with novel method(s) for solving part(s) of ROMC without reimplementing everything from scratch. In both scenarios, the ROMC parts can run in a fully-parallelized manner, exploiting all CPU cores. We also provide helpful functionalities for (i) inspecting the inference process and (ii) evaluating the obtained samples. Finally, we test the robustness of our implementation on some typical LFI examples