Longitudinal Additive and Multiplicative Effects Models for Networks
Source:R/amen-package.R
lame-package.RdAn extension of the 'amen' package specifically designed for longitudinal network analysis. This package provides tools for fitting Additive and Multiplicative Effects (AME) models to longitudinal/replicated relational data with several extensions: (1) handling of changing actor compositions across time periods, allowing for networks with different sets of actors at each time point; (2) significant performance improvements through C++ implementations via Rcpp and RcppArmadillo; (3) specialized functions for temporal network dynamics. The package supports four data types: normal (nrm), binary (bin), ordinal (ord) and Poisson count (poisson). Based on the AME framework originally developed by Hoff (2009) and Hoff, Fosdick, Volfovsky and Stovel (2013).
Details
Estimators. The package offers two estimation routes:
ame/lame– the Bayesian MCMC estimators, for calibrated posterior inference (cross-sectional and longitudinal respectively).ame_als/lame_als– a fast, MCMC-free estimator that reports a standard error for every estimate. Use it for rapid model exploration, rank selection and starting values; use the MCMC estimators for final inference.
| Package: | lame |
| Type: | Package |
| License: | MIT |
Examples
# \donttest{
data(YX_nrm)
# chains = 1 keeps the example short; the default runs two chains and compares them
fit <- ame(YX_nrm$Y, Xdyad = YX_nrm$X, burn = 10, nscan = 100, odens = 1,
family = "normal", verbose = FALSE, chains = 1)
summary(fit)
#>
#> Regression coefficients:
#> pmean psd z-stat p-val
#> intercept_dyad -2.707 0.109 -24.816 0.000
#> rgpa_dyad 0.218 0.100 2.168 0.030
#> rsmoke_dyad 0.249 0.140 1.776 0.076
#> cgpa_dyad 0.165 0.030 5.550 0.000
#> csmoke_dyad 0.104 0.046 2.266 0.023
#> igrade_dyad 1.139 0.032 35.186 0.000
#> igpa_dyad 0.053 0.017 3.168 0.002
#> ismoke_dyad 0.030 0.028 1.075 0.283
#>
#> Variance parameters:
#> pmean psd
#> va 0.824 0.112
#> cab 0.096 0.029
#> vb 0.082 0.010
#> rho 0.919 0.002
#> ve 1.051 0.021
# }