R/IJSE-package.R

#' IJ inference for posterior expectations
#'
#' Compute infinitesimal jackknife sampling uncertainty from matched posterior
#' draws and observation-level log likelihoods, with optional cluster aggregation.
#'
#' @section Start with your available inputs:
#' \tabular{ll}{
#'   A fitted brms model \tab \code{\link{ijse}} returns structured inference.\cr
#'   Draws and log likelihoods \tab \code{\link{ijse_draws}} is backend independent.\cr
#'   Existing vector-only code \tab \code{\link{IJ_se}} preserves the original API.\cr
#'   A computed result \tab \code{\link{summary.ijse}} documents standard methods.
#' }
#' The matrix/callback interface requires no brms or Stan installation. The brms
#' interface requires brms; installed synthetic examples can be used without
#' compiling Stan or fitting a new model.
#'
#' @section What the uncertainty means:
#' The target is a posterior expectation, including a function evaluated jointly
#' on every draw. Posterior draw covariance and IJ sampling covariance are
#' different quantities. \code{vcov(result)} returns IJ covariance;
#' \code{vcov(result, type = "posterior")} returns posterior covariance.
#' \code{confint(result)} uses a normal reference and IJ SEs. IJ changes uncertainty,
#' not estimator bias, and cluster IDs must reflect meaningful independent units.
#'
#' @section Executable tutorials and calibration study:
#' \itemize{
#'   \item \code{vignette("ijse", package = "IJSE")}: complete first calculation,
#'     covariance, transformations and callbacks without Stan.
#'   \item \code{vignette("ijse-brms", package = "IJSE")}: actual median-regression
#'     examples, explicit sampling IDs, joint contrasts and draw selection.
#'   \item \code{vignette("ijse-diagnostics", package = "IJSE")}: chain metadata,
#'     influence derivatives and reproduced input errors.
#'   \item \code{vignette("ijse-study", package = "IJSE")}: 40,000 exact-posterior
#'     datasets, 320 independent draw ensembles and 400 actual brms fits, with
#'     Monte Carlo uncertainty and explicit calibration limitations.
#' }
#' The three tutorial scripts are installed under \code{system.file("tutorials",
#' package = "IJSE")}. The study vignette reads compact results; package checks
#' do not rerun the MCMC study. Use \code{citation("IJSE")} for software and
#' published-method citations.
#'
#' @seealso \code{\link{ijse}}, \code{\link{ijse_draws}},
#'   \code{\link{summary.ijse}}
#' @name IJSE-package
#' @aliases IJSE
"_PACKAGE"

Try the IJSE package in your browser

Any scripts or data that you put into this service are public.

IJSE documentation built on Oct. 22, 2026, 5:18 p.m.