gdpar

General Dynamic Parameter Models via Reference Anchoring

gdpar is an R package implementing a unified predictive framework in which each unit’s parameter is decomposed around a population reference:

theta_i = theta_ref + Delta(x_i, theta_ref)

with Delta following the canonical Additive–Multiplicative–Modulated (AMM) form a(x) + b(x) * theta + W(theta) x. Here theta_ref is a population reference estimated from the data and Delta is an explicit, identifiable deviation function. The package provides identifiability diagnostics, validity tests for the population reference, distributional (multi-slot) regression, empirical-Bayes and full-Bayes estimation, a causal-inference bridge, a geometric-robustness sampling engine, and dependence-robust inference.

Installation

Path 1 (the operational estimation path) uses Stan via cmdstanr. Install the back-end once per machine:

install.packages(
  "cmdstanr",
  repos = c("https://stan-dev.r-universe.dev", getOption("repos"))
)
cmdstanr::install_cmdstan()

Then install gdpar from GitHub:

# install.packages("remotes")
remotes::install_github("IsadoreNabi/gdpar")

Quick start

library(gdpar)

set.seed(20260526)
n <- 200L
x <- rnorm(n)
y <- 1.5 + 0.8 * x + rnorm(n, sd = 0.3)   # theta_ref = 1.5, a = 0.8
dat <- data.frame(y = y, x = x)

fit <- gdpar(
  formula = y ~ x,
  data    = dat,
  family  = gdpar_family("gaussian"),
  path    = "bayes"
)

summary(fit)
coef(fit)
predict(fit, newdata = data.frame(x = seq(-2, 2, length.out = 11)), level = 0.9)

See the vop00_quickstart vignette for a line-by-line walk-through.

The three estimation paths

gdpar specifies three estimation paths for the AMM decomposition:

Calls to the not-yet-implemented paths abort with gdpar_unsupported_feature_error.

Capabilities

Validation

gdpar was re-validated against mgcv, brms, INLA and rstanarm:

Reports: inst/benchmarks/results/block9_synthetic_recovery.md and inst/benchmarks/results/block9_revalidation.md.

Documentation

The package ships an extensive set of vignettes: an operational track (vop00vop09, from quickstart to dependence-robust inference) and a theoretical track (v00v09, covering the canonical form, identifiability, the gnoseological validity of the population reference, the per-path asymptotic theory, the empirical-Bayes versus full-Bayes comparison, and the causal-inference positioning).

Author and citation

José Mauricio Gómez Julián (ORCID 0009-0000-2412-3150).

License

GPL (>= 3).