summary.ijse: Summarize IJ inference

View source: R/methods.R

summary.ijseR Documentation

Summarize IJ inference

Description

Standard methods for posterior expectations and their IJ sampling covariance. Normal intervals are centered on posterior expectations and use IJ SEs; they are not posterior credible intervals or a small-cluster correction.

Usage

## S3 method for class 'ijse'
coef(object, ...)

## S3 method for class 'ijse'
vcov(object, ..., type = c("ij", "posterior"))

## S3 method for class 'ijse'
influence(model, ...)

## S3 method for class 'ijse'
confint(object, parm, level = 0.95, ...)

## S3 method for class 'ijse'
summary(object, level = 0.95, ...)

## S3 method for class 'ijse'
print(x, digits = max(3L, getOption("digits") - 3L), ...)

## S3 method for class 'summary.ijse'
print(x, digits = max(3L, getOption("digits") - 3L), ...)

Arguments

object, x, model

An ijse object, or its summary for the summary print method.

...

Reserved for future arguments; must be empty.

type

For vcov(), select IJ sampling covariance (default) or covariance of the posterior draws with type = "posterior".

parm

Parameter names or integer indices; defaults to all quantities.

level

Confidence level strictly between zero and one.

digits

Number of significant digits used for printing.

Details

confint() uses the posterior expectation plus or minus a standard-normal critical value times the IJ SE. It is symmetric and uses a normal reference, even for clustered results. It is not an equal-tailed posterior credible interval, an IJ Monte Carlo interval, or a t correction. The upper-tail calculation avoids rounding a valid probability to one when level is very close to one. Below level = 1e-8, the central inverse-probability expansion \sqrt{\pi/2}\,level avoids losing a tiny positive level; its omitted relative correction is below double precision. Floating-point precision can limit display of extreme confidence levels and very narrow interval endpoints.

SE_ratio in the summary is IJ_SE / Posterior_SD; it is NA when the posterior SD is zero. A larger ratio alone does not prove calibrated inference. The two vcov() choices estimate distinct objects. Posterior covariance is unavailable in objects saved before version 0.3.0; recompute those objects to request it.

Saved influence() values are K\widehat C_u, not zero-centered influence values. Divide by n_units to obtain case-weight derivative estimates. For a small likelihood-weight change \Delta w_u, \Delta E(g\mid y)\approx\widehat C_u\Delta w_u; downweighting reverses the derivative's sign. Deleting a whole unit is a finite perturbation and need not equal this local approximation. The rows need not have mean zero. Sampling covariance centers across units, so cov(t(influence(result))) / result$n_units reproduces vcov(result). Use result$unit_ids for exact cluster IDs; columns use unique display labels. Independent observations use their likelihood-column indices.

In a finite-draw importance-reweighting check, normalized empirical weights differentiate with denominator S, whereas IJSE uses sample covariance with denominator S-1. Multiply that numerical derivative by S/(S-1) when checking equality. This is a testing identity, not an extra correction to apply to the reported IJ SE.

Value

coef() returns a named vector of posterior expectations. vcov() returns the P\times P IJ sampling covariance by default, or posterior draw covariance for type = "posterior". confint() returns a quantities-by-two matrix, in the requested parm order, with percentage-labeled columns. When the percentage labels would coincide at display precision, columns are named lower and upper. influence() returns the saved quantities-by-units matrix or errors when influence was not retained. summary() returns a summary.ijse list: coefficients (Estimate, Posterior_SD, IJ_SE, SE_ratio, lower and upper limits), counts, clustered, unit_ids, level, diagnostics and call. Print methods invisibly return their input.

See Also

ijse_draws, ijse.

Examples

set.seed(1)
y <- c(-1, 0, 0.5, 1, 2)
v <- 1 / (length(y) + 1 / 4)
d <- cbind(theta = rnorm(1000, v * sum(y), sqrt(v)))
ll <- vapply(y, function(yi) dnorm(yi, d[, 1], log = TRUE),
             numeric(nrow(d)))
result <- ijse_draws(d, ll, save_influence = TRUE)
coef(result)
vcov(result)
confint(result, level = 0.90)
summary(result)
vcov(result, type = "posterior")
influence(result) / result$n_units
stopifnot(isTRUE(all.equal(
  cov(t(influence(result))) / result$n_units, vcov(result))))

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