Computes bootstrap standard errors and percentile confidence intervals for
a fast AME fit produced by ame_als or
lame_als. Two strategies are available:
parametric(default) Simulates fresh outcomes from the
fitted model and refits. For normal and IRLS (binary,
poisson) fits the simulation is on the calibrated response scale;
for a non-normal transform fit -- whose estimator is a Gaussian
fit to a fixed transformed response -- it is on the Gaussian working
scale. The fitted residual variance is df-corrected (mean-model degrees
of freedom) at fit time, so simulating with it keeps the replicates
centred on the point estimate.
Available for both cross-sectional and longitudinal fits.
blockResamples time slices with replacement. With
block_length = 1 slices are resampled independently;
block_length > 1 draws contiguous blocks (a moving-block
bootstrap), which preserves short-run temporal dependence. Longitudinal
fits only (requires T > 1); with few slices its intervals are
necessarily coarse.
Every replicate is refit by ame_als_refit, warm-started
from the original point estimate so that replicates do not drift to
different local optima. Replicates that error or return non-finite values
are dropped and counted (n_valid / n_total). Standard errors
are replicate column standard deviations; confidence intervals use the
percentile method.
ame_als_bootstrap(
object,
R = 200,
type = c("parametric", "block"),
block_length = 1,
seed = NULL,
verbose = TRUE
)boot_ame(
object,
R = 200,
type = c("parametric", "block"),
block_length = 1,
seed = NULL,
verbose = TRUE
)
An object of class "boot_ame" with components including
coefs (replicate intercept + regression coefficients), se,
ci_lo, ci_hi, point_est, param_names;
vc_* for the variance components; a_coefs, b_coefs,
se_a, se_b; U_aligned, V_aligned,
U_raw, V_raw, se_U, se_V (when R > 0);
and n_valid, n_total, type, family.
an ame_als object from ame_als
or lame_als.
integer number of bootstrap replicates (default 200).
"parametric" (default) or "block"; see Description.
block length for the block bootstrap: 1 (default)
resamples time slices independently; an integer > 1 draws contiguous
blocks of that many slices (a moving-block bootstrap), appropriate when the
series has short-run temporal dependence. Capped at T; ignored for
the parametric bootstrap.
optional integer random seed.
logical; print progress (default TRUE).
Cassy Dorff, Shahryar Minhas, Tosin Salau
Choice of inference. The Social Influence Regression paper of
Hoff & Minhas (2025) derives its primary standard errors from the observed
Hessian (classical \(-H^{-1}\) and the sandwich/robust estimator
\(H^{-1} S H^{-1}\)). Two features of the AME model make a Hessian-based
variance awkward here. First, without an explicit gauge fix the rank-R
multiplicative term is identified only up to a full \(R\times R\)
rotation/reflection (\(U \to U R\), \(V \to V R^{-\top}\)), leaving the
joint Hessian rank-deficient. Second, even with a gauge fixed, the non-normal
families are fit on a Gaussian working response, so a Hessian computed from
that working objective is not calibrated to the family likelihood. The
bootstrap side-steps both issues and is the recommended uncertainty tool
here, mirroring sir::boot_sir().
Alignment-sensitive quantities. The regression coefficients
beta, the additive effects a, b and the variance
components are rotation-invariant and are aggregated directly. The
multiplicative factors U, V are not: each replicate is
Procrustes-aligned to the original fit before its standard errors are
computed. The object stores both the raw and aligned replicate factors so
the effect of alignment can be inspected. The alignment is well-determined
only when the multiplicative singular values are well separated; with
near-equal singular values the per-column U/V standard errors
reflect an unstable rotation, and the subspace --- or, for symmetric models,
the eigenvalues L --- is the summary of record. For a symmetric model
the eigenvalues L of the multiplicative term are aggregated and
reported as the primary multiplicative-uncertainty summary.
The parametric bootstrap is a full parametric bootstrap of the AME
model: each replicate draws fresh additive random effects a, b
from their fitted dispersion (va, vb, cab) and fresh
residuals, holding mu, beta and the multiplicative term fixed.
Regenerating the additive effects (rather than holding the fitted a,
b fixed) is what gives the intercept and node-covariate standard
errors their actor-level sampling-variability component.
Assumptions. The block bootstrap treats the time slices as
exchangeable replicates of the static-effects model --- appropriate for that
model, but not for strongly trended or serially dependent series (use the
dynamic lame there); with only a few time slices it is
necessarily coarse, its intervals correspondingly imprecise and somewhat
anti-conservative, so parametric is the default. A variance component
fit with R > 0 can still carry a small residual parametric-bootstrap
bias (the low-rank refit re-absorbs simulated noise); summary() flags
any point estimate that falls outside its interval. A binary IRLS fit can
carry a finite-sample (incidental-parameters) bias in the point estimator
itself, which the bootstrap reproduces rather than removes. The MCMC
ame / lame path gives posterior summaries when
that is the target.
Minhas, S. and Hoff, P. D. (2025). Decomposing Network Dynamics: Social
Influence Regression. Political Analysis. The block and parametric
bootstrap follow the inference scheme of sir::boot_sir() developed
for the SIR estimator.
ame_als and lame_als, both of
which accept bootstrap = N, bootstrap_type,
bootstrap_block_length, bootstrap_seed to do this
work in a single call when you are about to fit the model
anyway. ame_als_bootstrap() is the post-hoc path
(bootstrap an already-fit object without refitting from
scratch). ame_als_refit for warm-start refits;
confint.boot_ame for the bootstrap CI extractor.
# \donttest{
Y <- replicate(6, { m <- matrix(rnorm(225), 15, 15); diag(m) <- NA; m },
simplify = FALSE)
fit <- lame_als(Y, R = 1, family = "normal", verbose = FALSE)
# post-hoc bootstrap of an existing fit:
bt <- ame_als_bootstrap(fit, R = 50, type = "block",
seed = 1, verbose = FALSE)
# equivalent one-shot call:
# fit_b <- lame_als(Y, R = 1, family = "normal", verbose = FALSE,
# bootstrap = 50, bootstrap_type = "block",
# bootstrap_seed = 1)
print(bt)
# }
Run the code above in your browser using DataLab