Journal of Statistical Software Volume 115に記載されている内容を一覧にまとめ、機械翻訳を交えて日本語化し掲載します。
目次
- 1 記事
- 1.1 singleRcapture: An R Package for Single-Source Capture-Recapture Models
- 1.2 sdmTMB: An R Package for Fast, Flexible, and User-Friendly Generalized Linear Mixed Effects Models with Spatial and Spatiotemporal Random Fields
- 1.3 MixtureMissing: An R Package for Robust and Flexible Model-Based Clustering with Incomplete Data
- 1.4 watson: An R Package for Fitting Mixtures of Watson Distributions
- 1.5 dynamite: An R Package for Dynamic Multivariate Panel Models
- 1.6 dbnR: Gaussian Dynamic Bayesian Network Learning and Inference in R
- 1.7 skewlmm: An R Package for Fitting Skewed and Heavy-Tailed Linear Mixed Models
- 1.8 SMLE: An R Package for Joint Feature Screening in Ultrahigh-Dimensional GLMs
- 1.9 counterfactuals: An R Package for Counterfactual Explanation Methods
- 1.10 TrendLSW: Trend and Spectral Estimation of Nonstationary Time Series in R
- 1.11 equateMultiple: An R Package to Equate Multiple Forms
- 2 コード・スニペット
- 3 参考文献
- 4 関連情報
記事
singleRcapture: An R Package for Single-Source Capture-Recapture Models
singleRcapture: An R Package for Single-Source Capture-Recapture Models / singleRcapture: 単一ソース捕獲再捕獲モデルのためのRパッケージ
Population size estimation is a major challenge in official statistics, social sciences, and natural sciences. The problem can be tackled by applying capture-recapture methods, which vary depending on the number of sources used, particularly on whether a single or multiple sources are involved. This paper focuses on the first group of methods and introduces a novel R package: singleRcapture. The package implements state-of-the-art single-source capture-recapture (SSCR) models (e.g., zero-truncated one-inflated regression) together with new developments proposed by the authors, and provides a user-friendly application programming interface (API). This self-contained package can be used to produce point estimates and their variance and implements several bootstrap variance estimators or diagnostics to assess quality and conduct sensitivity analysis. It is intended for users interested in estimating the size of populations, particularly those that are difficult to reach or measure, for which information is available only from one source and dual/multiple system estimation is not applicable. Our package serves to bridge a significant gap, as the SSCR methods are either not available at all or are only partially implemented in existing R packages and other open-source software.
人口規模の推定は、公式統計、社会科学、自然科学において大きな課題となっています。この問題は、捕獲再捕獲法を適用することで解決できますが、その方法は使用する情報源の数、特に単一の情報源を用いるか複数の情報源を用いるかによって異なります。本稿では、最初のグループの方法に焦点を当て、新しいRパッケージ「singleRcapture」を紹介します。このパッケージは、最先端の単一情報源捕獲再捕獲(SSCR)モデル(例えば、ゼロ切り捨て1膨張回帰)と著者らが提案する新しい開発を実装し、使いやすいアプリケーションプログラミングインターフェース(API)を提供します。この自己完結型のパッケージは、点推定値とその分散を生成するために使用でき、品質評価と感度分析を行うための複数のブートストラップ分散推定器または診断機能を実装しています。このパッケージは、特にアクセスや測定が困難な人口、つまり単一の情報源からしか情報が得られず、二重/多重システム推定が適用できない人口の規模を推定することに関心のあるユーザーを対象としています。本パッケージは、SSCR法が既存のRパッケージやその他のオープンソースソフトウェアで全く利用できないか、部分的にしか実装されていないという大きなギャップを埋めるものです。
sdmTMB: An R Package for Fast, Flexible, and User-Friendly Generalized Linear Mixed Effects Models with Spatial and Spatiotemporal Random Fields
sdmTMB: An R Package for Fast, Flexible, and User-Friendly Generalized Linear Mixed Effects Models with Spatial and Spatiotemporal Random Fields / sdmTMB: 空間および時空間ランダムフィールドを持つ高速で柔軟かつユーザーフレンドリーな一般化線形混合効果モデルのためのRパッケージ
Geostatistical spatial or spatiotemporal data are common across scientific fields. However, appropriate models to analyze these data, such as generalized linear mixed effects models (GLMMs) with Gaussian Markov random fields (GMRFs), are computationally intensive and challenging for many users to implement. Here, we introduce the R package sdmTMB, which extends the flexible interface familiar to users of lme4, glmmTMB, and mgcv to include spatial and spatiotemporal latent GMRFs using the stochastic partial differential equation (SPDE) approach. SPDE matrices are constructed with fmesher, and estimation is conducted via maximum marginal likelihood with TMB or via Bayesian inference with tmbstan and rstan. We describe the model and explore case studies that illustrate sdmTMB’s flexibility in implementing penalized smoothers, non-stationary processes (time-varying and spatially varying coefficients), hurdle models, cross-validation, and anisotropy (directionally dependent spatial correlation). Finally, we compare the functionality, speed, and interfaces of related software, demonstrating that sdmTMB can be an order of magnitude faster than R-INLA. We hope sdmTMB will help open this useful class of models to more geostatistical analysts.
地理統計的な空間データや時空間データは、様々な科学分野で広く用いられています。しかし、これらのデータを分析するための適切なモデル、例えばガウスマルコフ確率場(GMRF)を用いた一般化線形混合効果モデル(GLMM)などは、計算負荷が高く、多くのユーザーにとって実装が困難です。そこで本稿では、lme4、glmmTMB、mgcvのユーザーに馴染みのある柔軟なインターフェースを拡張し、確率偏微分方程式(SPDE)アプローチを用いて空間および時空間潜在GMRFを組み込んだRパッケージsdmTMBを紹介します。SPDE行列はfmesherを用いて構築され、推定はTMBを用いた最大周辺尤度法、またはtmbstanとrstanを用いたベイズ推論によって行われます。本稿では、モデルについて説明し、ペナルティ付き平滑化、非定常プロセス(時間変動係数および空間変動係数)、ハードルモデル、交差検証、異方性(方向依存空間相関)の実装におけるsdmTMBの柔軟性を示すケーススタディを検証します。最後に、関連ソフトウェアの機能、速度、インターフェースを比較し、sdmTMBがR-INLAよりも桁違いに高速であることを示します。sdmTMBが、この有用なモデル群をより多くの地質統計学者に開放する一助となることを期待します。
MixtureMissing: An R Package for Robust and Flexible Model-Based Clustering with Incomplete Data
MixtureMissing: An R Package for Robust and Flexible Model-Based Clustering with Incomplete Data / MixtureMissing: 不完全データに対する堅牢かつ柔軟なモデルベースクラスタリングのためのRパッケージ
The R package MixtureMissing performs model-based clustering on data sets with values missing at random, aiming to identify homogeneous groups of observations. In model-based clustering, the data within each cluster follow a specific distribution. In the package, 13 distributions are available, including the contaminated normal distribution, the generalized hyperbolic distribution (GHD), and 11 special or limiting cases of GHD. Notably, eight out of these 11 cases have not been formulated at the time of writing. Given a list of candidate distributions, the package can recommend the optimal distribution to employ based on a specified information criterion. In this paper, the methodological foundations and computational aspects of the package are discussed. Furthermore, important features of model fitting, model summary, and available visualization tools are thoroughly illustrated using real data sets.
RパッケージMixtureMissingは、ランダムに欠損値を持つデータセットに対してモデルベースクラスタリングを実行し、均質な観測値グループを識別することを目的としています。モデルベースクラスタリングでは、各クラスター内のデータは特定の分布に従います。このパッケージでは、汚染正規分布、一般化双曲分布(GHD)、および11のGHDの特殊ケースまたは限界ケースを含む13の分布が利用可能です。注目すべきことに、これら11のケースのうち8つは執筆時点ではまだ定式化されていません。候補分布のリストが与えられると、パッケージは指定された情報基準に基づいて、採用する最適な分布を推奨できます。本稿では、パッケージの方法論的基礎と計算面について説明します。さらに、モデルフィッティング、モデルサマリー、利用可能な視覚化ツールの重要な機能について、実際のデータセットを用いて徹底的に説明します。
watson: An R Package for Fitting Mixtures of Watson Distributions
watson: An R Package for Fitting Mixtures of Watson Distributions / watson: Watson分布の混合分布をフィッティングするためのRパッケージ
In this paper we present and showcase the R package watson which provides a computational framework for fitting and random sampling of the Watson distribution on a p-dimensional sphere. We first introduce the random sampling scheme of the package, which offers two sampling algorithms that are based of the results of Sablica, Hornik, and Leydold (2025). What is more, the package offers a smart tool to combine these two methods, and based on the selected parameters, it approximates the relative sampling speed for both methods and picks the faster one. In addition, we describe the main fitting function for the mixtures of Watson distribution which uses the expectation-maximization (EM) algorithm. Special features are the possibility to use multiple variants of the E-step and M-step, sparse matrices for the data representation and a control parameter which will dynamically eliminate small clusters with overall contribution smaller than this parameter. Moreover, we discuss the numerical issues of the whole fitting procedure and describe how this is handled and solved in the package. Finally, we demonstrate the package on multiple examples involving misspecified simulation study, estimation of the New Zealand earthquake data and depth image clustering.
本稿では、p次元球面上のWatson分布のフィッティングとランダムサンプリングのための計算フレームワークを提供するRパッケージwatsonを紹介します。まず、Sablica、Hornik、およびLeydold(2025)の結果に基づく2つのサンプリングアルゴリズムを提供するパッケージのランダムサンプリングスキームを紹介します。さらに、パッケージはこれら2つの方法を組み合わせるためのスマートツールを提供し、選択されたパラメータに基づいて両方の方法の相対的なサンプリング速度を近似し、より速い方法を選択します。さらに、期待値最大化(EM)アルゴリズムを使用するWatson分布の混合に対する主要なフィッティング関数について説明します。特別な機能として、EステップとMステップの複数のバリエーションを使用できる点、データ表現にスパース行列を使用できる点、そして全体の寄与がこのパラメータよりも小さい小さなクラスターを動的に除去する制御パラメータが挙げられます。さらに、フィッティング手順全体における数値的な問題について考察し、パッケージ内でどのように処理・解決されるかを説明します。最後に、シミュレーションの誤指定、ニュージーランド地震データの推定、深度画像クラスタリングといった複数の例を用いて、このパッケージの有効性を示します。
dynamite: An R Package for Dynamic Multivariate Panel Models
dynamite: An R Package for Dynamic Multivariate Panel Models / dynamite: 動的多変量パネルモデルのためのRパッケージ
dynamite is an R package for Bayesian inference of intensive panel (time series) data comprising multiple measurements per multiple individuals measured in time. The package supports joint modeling of multiple response variables, time-varying and time-invariant effects, a wide range of discrete and continuous distributions, group-specific random effects, latent factors, and customization of prior distributions of the model parameters. Models in the package are defined via a user-friendly formula interface, and estimation of the posterior distribution of the model parameters takes advantage of state-of-the-art Markov chain Monte Carlo methods. The package enables efficient computation of both individual-level and aggregated predictions and offers a comprehensive suite of tools for visualization and model diagnostics.
dynamite は、時間的に測定された複数の個体ごとの複数の測定値を含む集中パネル(時系列)データのベイズ推論のための R パッケージです。このパッケージは、多重応答変数、時間変動効果と時間不変効果、幅広い離散分布と連続分布、グループ固有のランダム効果、潜在因子、およびモデルパラメータの事前分布のカスタマイズのジョイントモデリングをサポートしています。パッケージ内のモデルは、ユーザーフレンドリーな数式インターフェースを介して定義され、モデルパラメータの事後分布の推定には最先端のマルコフ連鎖モンテカルロ法が活用されています。このパッケージは、個体レベルと集約レベルの両方の予測を効率的に計算することを可能にし、可視化とモデル診断のための包括的なツールスイートを提供します。
dbnR: Gaussian Dynamic Bayesian Network Learning and Inference in R
dbnR: Gaussian Dynamic Bayesian Network Learning and Inference in R / dbnR: Rによるガウス分布に基づく動的ベイジアンネットワーク学習と推論
Dynamic Bayesian networks are a type of multivariate time series forecasting model capable of a level of interpretability thanks to their graphical representation. They have been reported extensively in the literature in a variety of areas, but their application has usually involved an ad hoc implementation or adaptation of existing Bayesian network software to a dynamic case. In this paper, we present dbnR, an R package that encapsulates the whole process of learning the model and parameters from data and performing inference. The package provides three different structure learning algorithms, exact and approximate inference and a visualization tool that allows inspection of the graphical structure of the networks. The aim of dbnR is to provide a tool that enables fast deployment of dynamic Bayesian network models and to make them readily available as general purpose forecasting models.
動的ベイジアンネットワークは、グラフィカルな表現によりある程度の解釈可能性を備えた多変量時系列予測モデルの一種です。様々な分野の文献で広く報告されていますが、その応用には、通常、既存のベイジアンネットワークソフトウェアを動的なケースに合わせてアドホックに実装または適応させる必要がありました。本稿では、データからモデルとパラメータを学習し、推論を実行するプロセス全体をカプセル化したRパッケージdbnRを紹介します。このパッケージは、3つの異なる構造学習アルゴリズム、正確な推論と近似推論、そしてネットワークのグラフィカルな構造を検査できる可視化ツールを提供します。dbnRの目的は、動的ベイジアンネットワークモデルを迅速に展開し、汎用予測モデルとして容易に利用できるツールを提供することです。
skewlmm: An R Package for Fitting Skewed and Heavy-Tailed Linear Mixed Models
skewlmm: An R Package for Fitting Skewed and Heavy-Tailed Linear Mixed Models / skewlmm: 歪んだ裾野の重い線形混合モデルをフィッティングするためのRパッケージ
Longitudinal data are commonly analyzed using linear mixed models, which, for mathematical convenience, usually assume that both random effect and error follow normal distributions. However, these restrictive assumptions may result in a lack of robustness against departures from the normal distribution and invalid statistical inferences. Schumacher, Lachos, and Matos (2021) developed a flexible extension of linear mixed models considering the scale mixture of skew-normal class of distributions from a frequentist point of view, accommodating skewness and heavy tails, and the robust model formulation accounts for a possible within-subject serial dependence by considering some useful dependence structures. This paper presents the R package skewlmm, which implements the method proposed by Schumacher et al. (2021) and provides a user-friendly tool to fit robust linear mixed models to longitudinal data, including model-fit tests, residual analyzes, and plot functions to support model selection and evaluation. Two data sets and a synthetic example are analyzed to illustrate the methodology and software implementation.
縦断的データは、一般的に線形混合モデルを用いて分析されます。線形混合モデルでは、数学的な便宜上、ランダム効果と誤差の両方が正規分布に従うと仮定されます。しかし、これらの制限的な仮定は、正規分布からの逸脱に対する堅牢性の欠如や、無効な統計的推論につながる可能性があります。 Schumacher、Lachos、Matos (2021) は、頻度主義の観点から歪正規分布のスケール混合を考慮した線形混合モデルの柔軟な拡張を開発し、歪度と裾野の広がりを考慮しています。このロバストなモデル定式化は、いくつかの有用な依存構造を考慮することで、被験者内連続依存性の可能性を考慮しています。本論文では、Schumacherら (2021) が提案した手法を実装したRパッケージ skewlmm を紹介します。skewlmm は、ロバストな線形混合モデルを縦断的データに適合させるためのユーザーフレンドリーなツールであり、モデル適合検定、残差分析、モデル選択と評価を支援するプロット関数などが含まれています。2つのデータセットと合成例を用いて、この方法論とソフトウェア実装を説明します。
SMLE: An R Package for Joint Feature Screening in Ultrahigh-Dimensional GLMs
SMLE: An R Package for Joint Feature Screening in Ultrahigh-Dimensional GLMs / SMLE: 超高次元GLMにおける同時特徴スクリーニングのためのRパッケージ
Sparsity-restricted maximum likelihood estimation (SMLE) has received considerable attention for feature screening in ultrahigh-dimensional regression. SMLE is a computationally convenient method that naturally incorporates the joint effects among features in the screening process. We develop a publicly available R package SMLE, which provides a user-friendly environment to carry out the SMLE method in generalized linear models. In particular, the package includes functions to conduct SMLE-screening and the related post-screening selection with popular selection criteria such as AIC and (extended) BIC. The package gives users the flexibility in controlling a series of screening parameters and accommodates both numerical and categorical feature input. The usage of SMLE is illustrated on extensive numerical examples, where the promising performance of the package is well observed.
スパース性制限付き最尤推定法(SMLE)は、超高次元回帰における特徴スクリーニングにおいて大きな注目を集めています。SMLEは、スクリーニングプロセスにおいて特徴間の複合効果を自然に組み込む、計算効率の良い手法です。本稿では、一般化線形モデルでSMLE法を実行するためのユーザーフレンドリーな環境を提供する、公開されているRパッケージSMLEを開発します。特に、このパッケージには、SMLEスクリーニングと、AICや(拡張)BICなどの一般的な選択基準を用いたスクリーニング後の選択を実行する機能が含まれています。このパッケージは、ユーザーが一連のスクリーニングパラメータを柔軟に制御できるだけでなく、数値データとカテゴリデータの両方の入力に対応しています。SMLEの使用方法は、豊富な数値例で示されており、パッケージの優れた性能が明確に確認できます。
counterfactuals: An R Package for Counterfactual Explanation Methods
counterfactuals: An R Package for Counterfactual Explanation Methods / counterfactuals: 反事実的説明手法のためのRパッケージ
Counterfactual explanation methods provide information on how feature values of individual observations must be changed to obtain a desired prediction. Despite the increasing amount of proposed methods in research, only a few implementations exist, whose interfaces and requirements vary widely. In this work, we introduce the counterfactuals R package, which provides a modular and unified R6-based interface for counterfactual explanation methods. We implemented three existing counterfactual explanation methods and propose some optional methodological extensions to generalize these methods to different scenarios and to make them more comparable. We explain the structure and workflow of the package using real use cases and show how to integrate additional counterfactual explanation methods into the package. In addition, we compared the implemented methods for a variety of models and datasets with regard to the quality of their counterfactual explanations and their runtime behavior.
反事実的説明法は、望ましい予測を得るために個々の観測値の特徴値をどのように変更する必要があるかに関する情報を提供します。研究で提案されている手法の数は増加しているにもかかわらず、実装はごくわずかであり、そのインターフェースと要件は大きく異なります。本研究では、反事実的説明法のためのモジュール式で統一されたR6ベースのインターフェースを提供するcounterfactuals Rパッケージを紹介します。既存の3つの反事実的説明法を実装し、これらの手法をさまざまなシナリオに一般化し、比較しやすくするためのオプションの方法論的拡張を提案します。実際のユースケースを用いてパッケージの構造とワークフローを説明し、追加の反事実的説明法をパッケージに統合する方法を示します。さらに、さまざまなモデルとデータセットに対して実装された手法を、反事実的説明の質と実行時の動作に関して比較しました。
TrendLSW: Trend and Spectral Estimation of Nonstationary Time Series in R
TrendLSW: Trend and Spectral Estimation of Nonstationary Time Series in R / TrendLSW: Rにおける非定常時系列のトレンドおよびスペクトル推定
The TrendLSW R package has been developed to provide users with a suite of wavelet-based techniques to analyze the statistical properties of nonstationary time series. The key components of the package are (a) two approaches for the estimation of the evolutionary wavelet spectrum in the presence of trend; and (b) wavelet-based trend estimation in the presence of locally stationary wavelet errors via both linear and nonlinear wavelet thresholding; and (c) the calculation of associated pointwise confidence intervals. Lastly, the package directly implements boundary handling methods that enable the methods to be performed on data of arbitrary length, not just dyadic length as is common for wavelet-based methods, ensuring no preprocessing of data is necessary. The key functionality of the package is demonstrated through two data examples, arising from biology and activity monitoring.
TrendLSW Rパッケージは、非定常時系列の統計的特性を分析するためのウェーブレットベースの手法群をユーザーに提供するために開発されました。このパッケージの主要コンポーネントは、(a)トレンドが存在する場合の進化ウェーブレットスペクトルの推定のための2つのアプローチ、(b)線形および非線形ウェーブレット閾値処理による局所定常ウェーブレット誤差が存在する場合のウェーブレットベースのトレンド推定、(c)関連する点ごとの信頼区間の計算です。さらに、このパッケージは境界処理メソッドを直接実装しており、ウェーブレットベースの手法で一般的な二進数長だけでなく、任意の長さのデータに対してメソッドを実行できるため、データの前処理は不要です。このパッケージの主要な機能は、生物学と活動モニタリングから得られた2つのデータ例を通して実証されています。
equateMultiple: An R Package to Equate Multiple Forms
equateMultiple: An R Package to Equate Multiple Forms / equateMultiple: 多重形式を等式化するRパッケージ
Item response theory (IRT) provides a framework for modeling the responses given to a test or questionnaire, which are assumed to depend on an underlying latent variable and on some item parameters. Due to identifiability issues, when the parameters are estimated separately on different datasets, the estimates of the item parameters and the predicted values of the latent variable are not directly comparable. Equating is a statistical procedure that can be used to convert these values to a common metric and to obtain comparable test scores. The R package equateMultiple implements methods to link the parameters estimated on many different datasets. After briefly reviewing the IRT models and the equating methods, this article illustrates the use of the package.
項目反応理論(IRT)は、テストやアンケートへの回答をモデル化するためのフレームワークを提供します。これらの回答は、基礎となる潜在変数といくつかの項目パラメータに依存すると想定されています。識別可能性の問題により、異なるデータセットでパラメータを個別に推定した場合、項目パラメータの推定値と潜在変数の予測値を直接比較することはできません。等化とは、これらの値を共通の指標に変換し、比較可能なテストスコアを得るために使用できる統計的手法です。RパッケージequateMultipleは、多数の異なるデータセットで推定されたパラメータをリンクするためのメソッドを実装しています。この記事では、IRTモデルと等化メソッドについて簡単にレビューした後、このパッケージの使用方法を説明します。
コード・スニペット
Local Influence Diagnostics for Nonlinear Mixed Models under the Case-Weight Perturbation Scheme in SAS
Local Influence Diagnostics for Nonlinear Mixed Models under the Case-Weight Perturbation Scheme in SAS / SASにおけるケース重み摂動法を用いた非線形混合モデルの局所影響度診断
The nonlinear mixed model is a popular tool for analyzing continuous longitudinal data. This paper is primarily concerned with gauging the sensitivity of nonlinear mixed models to influential observations through local influence, which assesses the impact of small perturbations of the likelihood function. Unlike when case deletion is used, in local influence the model only needs to be fitted once, making it much more computationally appealing. The methodology is illustrated with two datasets, establishing that the local influence diagnostic can easily be applied to nonlinear mixed models through the NLMIXED procedure in the SAS software as a tool to identify influential individuals.
非線形混合モデルは、連続縦断データを解析するための一般的なツールです。本稿では、局所的影響を通して、影響力のある観測値に対する非線形混合モデルの感度を測定することに主眼を置いています。局所的影響とは、尤度関数の小さな変動の影響を評価するものです。ケース削除を使用する場合とは異なり、局所的影響ではモデルのフィッティングは一度だけで済むため、計算効率がはるかに高くなります。この手法は2つのデータセットを用いて説明されており、SASソフトウェアのNLMIXEDプロシージャーを用いて、影響力のある個体を識別するツールとして、局所的影響診断を非線形混合モデルに容易に適用できることを示しています。