Summarize posterior snap indices
Arguments
- fit
a
lamefit with snap-shift MCMC output, run with retained snap draws for posterior uncertainty.- actors
optional actor names or indices. Default uses every actor on the selected side.
- years
optional year/period names or indices. Default uses every period.
- side
"u"for sender/row-side snap indicators or"v"for receiver/column-side indicators.- probs
numeric quantiles to report.
Examples
set.seed(1)
n <- 12; Tt <- 3
Y <- lapply(seq_len(Tt), function(t) {
m <- matrix(rnorm(n * n), n, n); diag(m) <- NA; m
})
# chains = 1 keeps the example short; the default runs two chains and compares them
fit <- lame(Y, R = 1, dynamic_uv = TRUE, dynamic_uv_kind = "snap",
keep_snap_draws = "draws",
nscan = 20, burn = 5, odens = 1, verbose = FALSE, plot = FALSE, chains = 1)
snap_index_summary(fit, side = "u")
#> year side n_actors mean sd q2_5 q10 q50 q90
#> 1 t1 u 12 NA NA NA NA NA NA
#> 2 t2 u 12 0.1083333 0.1241933 0 0 0.08333333 0.3333333
#> 3 t3 u 12 0.1333333 0.1389181 0 0 0.08333333 0.3333333
#> q97_5
#> 1 NA
#> 2 0.3333333
#> 3 0.3770833