Title: | Bayesian Models for Aggregated Relational Data and Network Scale-Up Method |
---|---|
Description: | Interface to various precompiled Stan models for Aggregated Relational Data that estimate, among other things, network degrees. Includes models by Zheng et al (2006) <doi:10.1198/016214505000001168>, Maltiel et al (2015) <doi:10.1214/15-AOAS827>, Baum & Marsden (2023) <doi:10.1016/j.socnet.2023.02.001>. |
Authors: | Michal Bojanowski [aut, cre] , Derick S. Baum [aut], European Research Council [fnd] (Supported MB through grant 101020038 (PI Miranda Lubbers) <http://patchwork-erc.eu/en>) |
Maintainer: | Michal Bojanowski <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.0-0 |
Built: | 2024-10-29 03:20:31 UTC |
Source: | https://github.com/coalesce-lab/stansum |
Some artificial datasets simulated from various ARD models.
Fake_maltiel_RD
Fake_maltiel_RD
Unless stated otherwise below all datasets are data frames with respondents in rows and subpopulations in columns.
Fake_maltiel_RD
is sampled from Maltiel et al (2015) Random
Degree model assuming 1000 respondents and
3 subpopulations.
Maltiel, R., Raftery, A. E., McCormick, T. H., & Baraff, A. J. (2015). Estimating Population Size Using the Network Scale Up Method. The Annals of Applied Statistics, 9(3), 1247–1277. https://doi.org/10.1214/15-AOAS827
List Stan models available in this package or load them in the form of
CmdStanModel
objects as implemented in the cmdstanr package.
get_model(name, ...) list_models()
get_model(name, ...) list_models()
name |
character; name of the model to load |
... |
arguments passed to instantiate::stan_package_model |
get_model
returns an "CmdStanModel" object.
list_models
returns a character vector of model names provided
with the package.
Bayesian model for ARD including parameters capturing barrier effects.
maltiel_bem_count
– model for count responses
maltiel_bem_dichotomous
– model for dichotmous responses
proposed by Baum & Marsden (2023).
maltiel_bem_trichotomous
– model for trichotomous responses
proposed by Baum & Marsden (2023).
maltiel_bem_count(N, K, y, m, L, ...) maltiel_bem_dichotomous(N, K, y, m, L, ...) maltiel_bem_trichotomous(N, K, y, m, L, ...)
maltiel_bem_count(N, K, y, m, L, ...) maltiel_bem_dichotomous(N, K, y, m, L, ...) maltiel_bem_trichotomous(N, K, y, m, L, ...)
N |
integer; population size |
K |
integer; number of sub-populations |
y |
integer matrix; ARD |
m |
numeric; vector of fractional sizes of sub-populations |
L |
numeric; lower bound on degree |
... |
other arguments passed to |
Calling this function(s) will load the model object using
get_model()
and sample from the posterior using the cmdstanr::sample()
method.
Object of class cmdstanr::CmdStanMCMC containing the samples.
Baum, D. S., & Marsden, P. V. (2023). Uses and limitations of dichotomous aggregate relational data. Social Networks, 74, 42–61. doi:10.1016/j.socnet.2023.02.001
Maltiel, R., Raftery, A. E., McCormick, T. H., & Baraff, A. J. (2015). Estimating Population Size Using the Network Scale Up Method. The Annals of Applied Statistics, 9(3), 1247–1277. doi:10.1214/15-AOAS827
Use get_model()
to return Stan model object of class
cmdstanr::CmdStanModel without fitting it.
Other models in this package:
maltiel_rdm
,
test_model()
,
zheng_bem
,
zheng_gp
Other models of Maltiel et al (2015):
maltiel_rdm
Bayesian model for ARD with random degree parameters.
maltiel_rdm_count
– model for count responses
maltiel_rdm_dichotomous
– model for dichotmous responses
proposed by Baum & Marsden (2023).
maltiel_rdm_count(N, K, y, m, L, ...) maltiel_rd_dichotomous(N, K, y, m, L, ...)
maltiel_rdm_count(N, K, y, m, L, ...) maltiel_rd_dichotomous(N, K, y, m, L, ...)
N |
integer; population size |
K |
integer; number of sub-populations |
y |
integer matrix; ARD |
m |
numeric; vector of fractional sizes of sub-populations |
L |
numeric; lower bound on degree |
... |
other arguments passed to |
Calling this function(s) will load the model object using
get_model()
and sample from the posterior using the cmdstanr::sample()
method.
Object of class cmdstanr::CmdStanMCMC containing the samples.
Baum, D. S., & Marsden, P. V. (2023). Uses and limitations of dichotomous aggregate relational data. Social Networks, 74, 42–61. doi:10.1016/j.socnet.2023.02.001
Maltiel, R., Raftery, A. E., McCormick, T. H., & Baraff, A. J. (2015). Estimating Population Size Using the Network Scale Up Method. The Annals of Applied Statistics, 9(3), 1247–1277. doi:10.1214/15-AOAS827
Use get_model()
to return Stan model object of class
cmdstanr::CmdStanModel without fitting it.
Other models in this package:
maltiel_bem
,
test_model()
,
zheng_bem
,
zheng_gp
Other models of Maltiel et al (2015):
maltiel_bem
A test Bernoulli model taken from Stan documentation.
test_model(N, y, ...)
test_model(N, y, ...)
N |
integer; number of trials |
y |
integer; vector of Bernoulli outcomes |
... |
other arguments passed to |
Calling this function(s) will load the model object using
get_model()
and sample from the posterior using the cmdstanr::sample()
method.
Object of class cmdstanr::CmdStanMCMC containing the samples.
Use get_model()
to return Stan model object of class
cmdstanr::CmdStanModel without fitting it.
Other models in this package:
maltiel_bem
,
maltiel_rdm
,
zheng_bem
,
zheng_gp
Bayesian model for ARD...
zheng_bem_count
– model for count responses
zheng_bem_dichotomous
– model for dichotmous responses
proposed by Baum & Marsden (2023).
zheng_bem_trichotomous
– model for trichotomous responses
proposed by Baum & Marsden (2023).
zheng_bem_count(N, K, y, ...) zheng_bem_dichotomous(N, K, y, ...) zheng_bem_trichotomous(N, K, y, ...)
zheng_bem_count(N, K, y, ...) zheng_bem_dichotomous(N, K, y, ...) zheng_bem_trichotomous(N, K, y, ...)
N |
integer; sample size |
K |
integer; number of sub-populations |
y |
integer matrix; ARD |
... |
other arguments passed to |
Calling this function(s) will load the model object using
get_model()
and sample from the posterior using the cmdstanr::sample()
method.
Object of class cmdstanr::CmdStanMCMC containing the samples.
Baum, D. S., & Marsden, P. V. (2023). Uses and limitations of dichotomous aggregate relational data. Social Networks, 74, 42–61. doi:10.1016/j.socnet.2023.02.001
Zheng, T., Salganik, M. J., & Gelman, A. (2006). How Many People Do You Know in Prison? Using Overdispersion in Count Data to Estimate Social Structure in Networks. Journal of the American Statistical Association, 101(474), 409–423. doi:10.1198/016214505000001168
Use get_model()
to return Stan model object of class
cmdstanr::CmdStanModel without fitting it.
Other models in this package:
maltiel_bem
,
maltiel_rdm
,
test_model()
,
zheng_gp
Other models of Zheng et al (2006):
zheng_gp
Bayesian model for ARD...
zheng_gp_count
– model for count responses
zheng_gp_dichotomous
– model for dichotmous responses
proposed by Baum & Marsden (2023).
zheng_gp_count(N, K, y, ...) zheng_gp_dichotomous(N, K, y, ...)
zheng_gp_count(N, K, y, ...) zheng_gp_dichotomous(N, K, y, ...)
N |
integer; population size |
K |
integer; number of sub-populations |
y |
integer matrix; ARD |
... |
other arguments passed to |
Calling this function(s) will load the model object using
get_model()
and sample from the posterior using the cmdstanr::sample()
method.
Object of class cmdstanr::CmdStanMCMC containing the samples.
Baum, D. S., & Marsden, P. V. (2023). Uses and limitations of dichotomous aggregate relational data. Social Networks, 74, 42–61. doi:10.1016/j.socnet.2023.02.001
Zheng, T., Salganik, M. J., & Gelman, A. (2006). How Many People Do You Know in Prison? Using Overdispersion in Count Data to Estimate Social Structure in Networks. Journal of the American Statistical Association, 101(474), 409–423. doi:10.1198/016214505000001168
Use get_model()
to return Stan model object of class
cmdstanr::CmdStanModel without fitting it.
Other models in this package:
maltiel_bem
,
maltiel_rdm
,
test_model()
,
zheng_bem
Other models of Zheng et al (2006):
zheng_bem