Network Scale-Up Models for Aggregated Relational Data

Provides a variety of Network Scale-up Models for researchers to analyze Aggregated Relational Data, through the use of Stan and 'glmmTMB'. Also provides tools for model checking In this version, the package implements models from Laga, I., Bao, L., and Niu, X (2023) , Zheng, T., Salganik, M. J., and Gelman, A. (2006) , Killworth, P. D., Johnsen, E. C., McCarty, C., Shelley, G. A., and Bernard, H. R. (1998) , and Killworth, P. D., McCarty, C., Bernard, H. R., Shelley, G. A., and Johnsen, E. C. (1998) .


networkscaleup

R-CMD-check

The networkscaleup package provides a suite of functions to both fit and diagnose the fit of several popular models for Aggregated Relational Data (ARD). These models are fit using Stan (RStan) and glmmTMB.

Installation

networkscaleup can be installed from CRAN with

install.packages("networkscaleup)

You can install the development version of networkscaleup from GitHub with:

# install.packages("pak")
pak::pak("ilaga/networkscaleup")

Simulating Data

The networkscaleup package allows simulation of synthetic ARD from commonly used models.

## simulate some simple data
library(networkscaleup)

set.seed(2)
sim_dat <- make_ard(family = "poisson")

We can then fit the (true) model to this data and evaluate the fit of this model. Several diagnostics are provided, including rootograms and residual computation.

pois_fit_list <- fit_mle(sim_dat$ard, family = "poisson")

pois_root <- hang_rootogram_ard(
  ard = sim_dat$ard,
  model_fit = pois_fit_list
)

pois_root

We see that the hanging rootogram indicates good fit, as would be expected. More flexible models and additional model checking diagnostics are also available.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("networkscaleup")

0.2-2 by Owen G. Ward, 4 months ago


https://github.com/ilaga/networkscaleup


Browse source code at https://github.com/cran/networkscaleup


Authors: Ian Laga [aut] , Owen G. Ward [aut, cre] , Anna L. Smith [aut] , Benjamin Vogel [aut] , Jieyun Wang [aut] , Le Bao [aut] , Xiaoyue Niu [aut]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports methods, Rcpp, rstan, LaplacesDemon, dplyr, ggplot2, scales, stats, readr, tibble, tidyr, rlang, glmmTMB, gridExtra, purrr, stringr, trialr, tidyselect, RMTstat

Suggests rmarkdown, knitr

Linking to BH, Rcpp, RcppEigen, rstan, StanHeaders

System requirements: GNU make


See at CRAN