Skip to contents

Options for saving posterior samples during MCMC

Usage

posterior_options(save_UV = FALSE, save_ab = FALSE, thin_UV = 10, thin_ab = 10)

Arguments

save_UV

Logical; whether to save samples of U and V matrices (default FALSE)

save_ab

Logical; whether to save samples of additive effects a and b (default FALSE)

thin_UV

Integer; thinning interval for U/V samples (default 10)

thin_ab

Integer; thinning interval for a/b samples (default 10)

Value

List of posterior saving options, to be passed to the posterior_opts argument of ame or lame: ame(Y, ..., posterior_opts = posterior_options(save_UV = TRUE)) or lame(Y, ..., posterior_opts = posterior_options(save_UV = TRUE)). With save_UV = TRUE, static fits store U_samples / V_samples (plus G_samples for bipartite fits) and dynamic_uv fits store the per-period trajectory in U_draws / V_draws; see latent_positions and simulate_posterior for summarising them. With save_ab = TRUE, static effects use a_samples / b_samples (the same draws in both for a symmetric fit, which has one effect per actor); longitudinal dynamic effects use actor-by-period-by-draw arrays a_draws / b_draws. thin_ab is measured in retained coefficient draws; thin_ab = 1 keeps them aligned.

Author

Cassy Dorff, Shahryar Minhas, Tosin Salau

Examples

opts <- posterior_options(save_UV = TRUE, thin_UV = 5)
opts
#> $save_UV
#> [1] TRUE
#> 
#> $save_ab
#> [1] FALSE
#> 
#> $thin_UV
#> [1] 5
#> 
#> $thin_ab
#> [1] 10
#>