Package: ERPM 0.2.0.9000

Marion Hoffman

ERPM: Exponential Random Partition Models

Simulates and estimates the Exponential Random Partition Model presented in the paper Hoffman, Block, and Snijders (2023) <doi:10.1177/00811750221145166>. It can also be used to estimate longitudinal partitions, following the model proposed in Hoffman and Chabot (2023) <doi:10.1016/j.socnet.2023.04.002>. The model is an exponential family distribution on the space of partitions (sets of non-overlapping groups) and is called in reference to the Exponential Random Graph Models (ERGM) for networks.

Authors:Marion Hoffman [cre, aut, cph], Alexandra Amani [aut], Nico Keiser [aut]

ERPM_0.2.0.9000.tar.gz
ERPM_0.2.0.9000.zip(r-4.5)ERPM_0.2.0.9000.zip(r-4.4)ERPM_0.2.0.9000.zip(r-4.3)
ERPM_0.2.0.9000.tgz(r-4.4-any)ERPM_0.2.0.9000.tgz(r-4.3-any)
ERPM_0.2.0.9000.tar.gz(r-4.5-noble)ERPM_0.2.0.9000.tar.gz(r-4.4-noble)
ERPM_0.2.0.9000.tgz(r-4.4-emscripten)ERPM_0.2.0.9000.tgz(r-4.3-emscripten)
ERPM.pdf |ERPM.html
ERPM/json (API)
NEWS

# Install 'ERPM' in R:
install.packages('ERPM', repos = c('https://stocnet.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/stocnet/erpm/issues

Datasets:
  • estimation - Exemplary outcome objects for the ERPM Package

On CRAN:

48 exports 10 stars 1.96 score 15 dependencies 136 downloads

Last updated 4 months agofrom:c483299977. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 20 2024
R-4.5-winOKAug 20 2024
R-4.5-linuxOKAug 20 2024
R-4.4-winOKAug 20 2024
R-4.4-macOKAug 20 2024
R-4.3-winOKAug 20 2024
R-4.3-macOKAug 20 2024

Exports:Bell_constraintscalculate_denominator_Dirichlet_restrictedcalculate_proba_Dirichlet_restrictedcheck_sizescompute_averagesizecompute_numgroups_denominatorcomputeStatisticscomputeStatistics_multiplecorrelation_betweencorrelation_with_sizecorrelation_withincount_classesCUPdraw_Metropolis_multipledraw_Metropolis_singleestimate_ERPMestimate_logLestimate_multipleERPMexactestimates_numgroupsfind_all_partitionsgridsearch_burnin_singlegridsearch_burninthining_multiplegridsearch_burninthining_singlegridsearch_thining_singlegroup_sizeiccnumber_categoriesnumber_tiesorder_groupidsphase1plot_averagesizesplot_numgroups_likelihoodplot_partitionproportion_isolaterange_attributerun_phase1_multiplerun_phase1_singlerun_phase2_multiplerun_phase2_singlerun_phase3_multiplerun_phase3_singlesame_pairssimilar_pairssimulate_burnin_singlesimulate_burninthining_multiplesimulate_burninthining_singlesimulate_thining_singleStirling2_constraints

Dependencies:clicpp11glueigraphlatticelifecyclemagrittrMatrixnumberspkgconfigRColorBrewerrlangsnowsnowfallvctrs

Readme and manuals

Help Manual

Help pageTopics
Function to calculate the number of partitions with groups of sizes between smin and smaxBell_constraints
Calculate Dirichlet denominatorcalculate_denominator_Dirichlet_restricted
Calculate Dirichlet probabilitycalculate_proba_Dirichlet_restricted
Function to determine whether a partition contains the allowed group sizescheck_sizes
Compute the average size of a random partitioncompute_averagesize
Compute denominator for model with number of groupscompute_numgroups_denominator
Compute StatisticscomputeStatistics
Compute Statistics multiplecomputeStatistics_multiple
Between groups correlationcorrelation_between
Correlation with sizecorrelation_with_size
Within groups correlationcorrelation_within
Function to count the number of partitions with a certain group size structure, for all possible group size structure. Function to use after calling the "find_all_partitions" function.count_classes
CUPCUP
Draw Metropolis multipledraw_Metropolis_multiple
Draw Metropolis singledraw_Metropolis_single
Estimate ERPMestimate_ERPM
Estimate log likelihoodestimate_logL
Estimate ERPM for multiple observationsestimate_multipleERPM
Exact estimates number of groupsexactestimates_numgroups
Function to enumerate all possible partitions for a given nfind_all_partitions
Grid - search burnin singlegridsearch_burnin_single
Grid - search burnin thining multiplegridsearch_burninthining_multiple
Grid - search burnin thining singlegridsearch_burninthining_single
Grid - search thining singlegridsearch_thining_single
Statistics on the size of groups in a partitiongroup_size
Intra class correlationicc
Number of individuals having an attributenumber_categories
Same pairs of individuals in a partitionnumber_ties
Function to replace the ids of the group without forgetting an id and put in the first appearance order for example: [2 1 1 4 2] becomes [1 2 2 3 1]order_groupids
Exemplary outcome objects for the ERPM Packageestimation outcomeObjects
Core function for Phase 1phase1
Plot average sizesplot_averagesizes
Plot likelihood of number groupsplot_numgroups_likelihood
Visualization of partitionplot_partition
Print results of bayesian estimation (beta version)print.results.bayesian.erpm
Print estimation resultsprint.results.list.erpm
Print results of estimation of phase 3print.results.p3.erpm
Proportion of isolatesproportion_isolate
Range of attribute in groupsrange_attribute
Phase 1 wrapper for multiple observationsrun_phase1_multiple
Phase 1 wrapper for single observationrun_phase1_single
Phase 2 wrapper for multiple observationrun_phase2_multiple
Phase 2 wrapper for single observationrun_phase2_single
Phase 3 wrapper for multiple observationrun_phase3_multiple
Phase 3 wrapper for single observationrun_phase3_single
Same pairs of individuals in a partitionsame_pairs
Similar pairs of individuals in a partitionsimilar_pairs
Simulate burn in singlesimulate_burnin_single
Simulate burnin thining multiplesimulate_burninthining_multiple
Simulate burnin thining singlesimulate_burninthining_single
Simulate thining singlesimulate_thining_single
Function to calculate the number of partitions with k groups of sizes between smin and smaxStirling2_constraints