get_centrality {tsnet}R Documentation

Compute Centrality Measures

Description

This function computes various network centrality measures for a given GVAR fit object. Centrality measures describe the "connectedness" of a variable in a network, while density describes the networks' overall connectedness. Specifically, it computes the in-strength, out-strength, contemporaneous strength, temporal network density, and contemporaneous network density. The result can then be visualized using [plot_centrality()].

Usage

get_centrality(fitobj, burnin = 0, remove_ar = TRUE)

Arguments

fitobj

Fitted model object for a Bayesian GVAR model. This can be 'tsnet_fit' object (obtained from [stan_gvar()]), a BGGM object (obtained from [BGGM::var_estimate()]), or extracted posterior samples (obtained from [stan_fit_convert()).

burnin

An integer specifying the number of initial samples to discard as burn-in. Default is 0.

remove_ar

A logical value specifying whether to remove the autoregressive effects for centrality calculation. Default is TRUE. This is only relevant for the calculation of temporal centrality/density measures.

Value

A list containing the following centrality measures:

Examples

 # Use first individual from example fit data from tsnet
 data(fit_data)
 centrality_measures <- get_centrality(fit_data[[1]])


[Package tsnet version 0.1.0 Index]