Package: netdiffuseR 1.22.6

George Vega Yon

netdiffuseR: Analysis of Diffusion and Contagion Processes on Networks

Empirical statistical analysis, visualization and simulation of diffusion and contagion processes on networks. The package implements algorithms for calculating network diffusion statistics such as transmission rate, hazard rates, exposure models, network threshold levels, infectiousness (contagion), and susceptibility. The package is inspired by work published in Valente, et al., (2015) <doi:10.1016/j.socscimed.2015.10.001>; Valente (1995) <ISBN: 9781881303213>, Myers (2000) <doi:10.1086/303110>, Iyengar and others (2011) <doi:10.1287/mksc.1100.0566>, Burt (1987) <doi:10.1086/228667>; among others.

Authors:George Vega Yon [aut, cre], Thomas Valente [aut, cph], Stephanie Dyal [ctb], Timothy Hayes [ctb]

netdiffuseR_1.22.6.tar.gz
netdiffuseR_1.22.6.zip(r-4.5)netdiffuseR_1.22.6.zip(r-4.4)netdiffuseR_1.22.6.zip(r-4.3)
netdiffuseR_1.22.6.tgz(r-4.4-x86_64)netdiffuseR_1.22.6.tgz(r-4.4-arm64)netdiffuseR_1.22.6.tgz(r-4.3-x86_64)netdiffuseR_1.22.6.tgz(r-4.3-arm64)
netdiffuseR_1.22.6.tar.gz(r-4.5-noble)netdiffuseR_1.22.6.tar.gz(r-4.4-noble)
netdiffuseR_1.22.6.tgz(r-4.4-emscripten)netdiffuseR_1.22.6.tgz(r-4.3-emscripten)
netdiffuseR.pdf |netdiffuseR.html
netdiffuseR/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/usccana/netdiffuser/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:

On CRAN:

contagiondiffusion-networknetwork-analysisnetwork-visualization

109 exports 85 stars 3.94 score 36 dependencies 1 mentions 197 scripts 498 downloads

Last updated 1 years agofrom:7c5c9a7d4a. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 08 2024
R-4.5-win-x86_64OKSep 08 2024
R-4.5-linux-x86_64OKSep 08 2024
R-4.4-win-x86_64OKSep 08 2024
R-4.4-mac-x86_64OKSep 08 2024
R-4.4-mac-aarch64OKSep 08 2024
R-4.3-win-x86_64OKSep 08 2024
R-4.3-mac-x86_64OKSep 08 2024
R-4.3-mac-aarch64OKSep 08 2024

Exports:%*%adjmat_to_edgelistadopt_changesapprox_geodesicapprox_geodistas_dgCMatrixas_diffnetas_spmatas.dgCMatrixbass_dFbass_fbass_Fbootnetclassifyclassify_adoptersclassify_graphcompare_matrixcumulative_adopt_countdgrdiag_expanddiffmapdiffnet_check_attr_classdiffnet_to_igraphdiffnet_to_networkdiffnet_to_networkDynamicdiffnet.attrsdiffnet.attrs<-diffnet.toadiffnet.toa<-diffnetLapplydiffregdiffusionMapdrawColorKeydrop_isolatededgelist_to_adjmatedgelist_to_diffnetedges_coordsego_varianceegonet_attrsexposurefitbassgraph_powergrid_distributionhazard_rateigraph_to_diffnetigraph_vertex_rescaleinfectionis_multipleis_selfis_undirectedis_valuedisolatedleader_matchingmatrix_comparementor_matchingmorann_rewiresnedgesnetmatchnetmatch_preparenetwork_to_diffnetnetworkDynamic_to_diffnetnew_diffnetnlinksnnodesnodesnslicesnverticespermute_graphplot_adoptersplot_diffnetplot_diffnet2plot_hazardplot_infectsuscepplot_thresholdpretty_withinrdiffnetrdiffnet_multipleread_mlread_pajekread_ucinetread_ucinet_headrecoderesample_graphrescale_vertex_igraphrewire_graphrewire_permuterewire_qaprgraph_bargraph_errgraph_wsring_latticeround_to_seqselect_egoalterstruct_equivstruct_teststruct_test_asympsurvey_to_diffnetsusceptibilitythresholdtoa_difftoa_mattransformGraphByvertex_covariate_comparevertex_covariate_distvertex_mahalanobis_distvertex_rescale_igraphweighted_varwvar

Dependencies:backportsbootchkclicodacpp11dplyrfansigenericsglueigraphlatticelifecyclemagrittrMASSMatchItMatrixnetworknetworkDynamicnetworkLitepillarpkgconfigR6RcppRcppArmadilloRcppProgressrlangsnaSparseMstatnet.commontibbletidyselectutf8vctrsviridisLitewithr

netdiffuseR showcase: Medical Innovations

Rendered fromanalyzing-medical-innovation-data.Rmdusingknitr::rmarkdownon Sep 08 2024.

Last update: 2018-03-26
Started: 2016-02-04

Not-Lost in translation: Getting diffusion data into netdiffuseR

Rendered fromnot-lost-in-translation-importing-and-exporting-graphs.Rmdusingknitr::rmarkdownon Sep 08 2024.

Last update: 2016-10-26
Started: 2016-03-30

Simulating diffusion networks: Using the rdiffnet function

Rendered fromintroduction-to-netdiffuser.Rmdusingknitr::rmarkdownon Sep 08 2024.

Last update: 2017-10-16
Started: 2016-01-13

Time Discounted Infection and Susceptibility

Rendered fromtime_discount_suscep_infect.Rmdusingknitr::rmarkdownon Sep 08 2024.

Last update: 2015-12-24
Started: 2015-11-12

Readme and manuals

Help Manual

Help pageTopics
Matrix multiplication%*% %*%.default %*%.diffnet
Approximate Geodesic Distancesapprox_geodesic approx_geodist Geodesic Shortest-Path
Coerce a matrix-like objects to 'dgCMatrix' (sparse matrix)as.dgCMatrix as_dgCMatrix as_dgCMatrix.array as_dgCMatrix.default as_dgCMatrix.diffnet as_dgCMatrix.igraph as_dgCMatrix.list as_dgCMatrix.network as_spmat
Coerce a diffnet graph into an arrayas.array.diffnet
Bass Modelbass bass_dF bass_F bass_f fitbass fitbass.default fitbass.diffnet plot.diffnet_bass
Network Bootstrappingbootnet c.diffnet_bootnet hist.diffnet_bootnet plot.diffnet_bootnet print.diffnet_bootnet resample_graph
Brazilian Farmersbrfarmers
'diffnet' version of the Brazilian Farmers databrfarmersDiffNet
Combine diffnet objectsc.diffnet
Classify adopters accordingly to Time of Adoption and Threshold levels.as.data.frame.diffnet_adopters classify classify_adopters classify_adopters.default classify_adopters.diffnet ftable.diffnet_adopters plot.diffnet_adopters
Analyze an R object to identify the class of graph (if any)classify_graph
Cummulative count of adopterscumulative_adopt_count
Indegree, outdegree and degree of the verticesdegree dgr indegree outdegree plot.diffnet_degSeq
Creates a square matrix suitable for spatial statistics models.diag_expand diag_expand.array diag_expand.dgCMatrix diag_expand.diffnet diag_expand.list diag_expand.matrix
Infer whether 'value' is dynamic or static.diffnet_check_attr_class
Indexing diffnet objects (on development)diffnet_index [.diffnet [<-.diffnet [[.diffnet [[<-.diffnet
'diffnet' Arithmetic and Logical Operators&.diffnet *.diffnet -.diffnet /.diffnet diffnet-arithmetic graph_power ^.diffnet |.diffnet
Creates a 'diffnet' class objectas.data.frame.diffnet as_diffnet as_diffnet.default as_diffnet.networkDynamic diffnet diffnet-class diffnet.attrs diffnet.attrs<- diffnet.toa diffnet.toa<- diffnetLapply dim.diffnet dimnames.diffnet is_multiple is_multiple.default is_multiple.diffnet is_self is_self.default is_self.diffnet is_undirected is_undirected.default is_undirected.diffnet is_valued is_valued.default is_valued.diffnet new_diffnet nodes print.diffnet str.diffnet t.diffnet
Diffusion regression modeldiffreg
Diffusion Network Datasetsdiffusion-data
Creates a heatmap based on a graph layout and a vertex attributediffmap diffusionMap diffusionMap.default diffusionMap.diffnet image.diffnet_diffmap plot.diffnet_diffmap print.diffnet_diffmap
Draw a color key in the current devicedrawColorKey
Conversion between adjacency matrix and edgelistadjmat_to_edgelist edgelist_to_adjmat
Compute ego/alter edge coordinates considering alter's size and aspect ratioedges_coords
Computes variance of Y at ego levelego_variance
Retrieve alter's attributes (network effects)egonet_attrs
Ego exposureexposure
Fake dynamic edgelistfakeDynEdgelist
Fake static edgelistfakeEdgelist
Fake survey datafakesurvey
Fake longitudinal survey datafakesurveyDyn
Distribution over a gridgrid_distribution
Network Hazard Ratehazard_rate plot.diffnet_hr plot_hazard plot_hazarrate
Coercion between graph classesdiffnet_to_igraph igraph igraph_to_diffnet
Susceptibility and Infectioninfection susceptibility
Find and remove isolated verticesdrop_isolated isolated
Korean Family Planningkfamily
'diffnet' version of the Korean Family Planning datakfamilyDiffNet
Non-zero element-wise comparison between two sparse matricesbinary-functions compare_matrix matrix_compare
Medical InnovationmedInnovations
'diffnet' version of the Medical Innovation datamedInnovationsDiffNet
Optimal Leader/Mentor Matchingleader_matching mentor_matching plot.diffnet_mentor
Computes Moran's I correlation indexmoran
netdiffuseRnetdiffuseR-package netdiffuseR
Network data formatsnetdiffuseR-graphs
'netdiffuseR' default optionsnetdiffuseR-options
Matching Estimators with Network Datanetmatch netmatch_prepare
Coercion between 'diffnet', 'network' and 'networkDynamic'diffnet_to_network diffnet_to_networkDynamic network networkDynamic networkDynamic_to_diffnet network_to_diffnet
Count the number of vertices/edges/slices in a graphnedges nlinks nnodes nslices nvertices
Permute the values of a matrixCUG permute_graph QAP rewire_permute rewire_qap
Visualize adopters and cumulative adoptersplot_adopters
Plot the diffusion processplot_diffnet plot_diffnet.default plot_diffnet.diffnet
Another way of visualizing diffusionplot_diffnet2 plot_diffnet2.default plot_diffnet2.diffnet
Plot distribution of infect/suscepplot_infectsuscep
Threshold levels through timeplot_threshold plot_threshold.array plot_threshold.default plot_threshold.diffnet
S3 plotting method for diffnet objects.plot.diffnet
Pretty numbers within a range.pretty_within
Random diffnet networkrdiffnet rdiffnet_multiple
Read foreign graph formatsread_dl read_ml read_net read_pajek
Reads UCINET filesread_ucinet read_ucinet_head UCINET ucinet
Recodes an edgelist such that ids go from 1 to nrecode recode.data.frame recode.matrix
Rescale vertex size to be used in 'plot.igraph'.igraph_vertex_rescale rescale_vertex_igraph vertex_rescale_igraph
Graph rewiring algorithmsrewire_graph
Scale-free and Homophilic Random Networksrgraph_ba scale-free
Erdos-Renyi modelbernoulli rgraph_er
Watts-Strogatz modelrgraph_ws small-world
Ring lattice graphring_lattice
Takes a numeric vector and maps it into a finite length sequenceround_to_seq
Calculate the number of adoption changes between ego and alter.adopt_changes select_egoalter summary.diffnet_adoptChanges
Structural Equivalenceprint.diffnet_se struct_equiv
Structure dependence testc.diffnet_struct_test hist.diffnet_struct_test n_rewires print.diffnet_struct_test struct_test struct_test_asymp
Summary of diffnet objectssummary.diffnet
Convert survey-like data and edgelists to a 'diffnet' objectedgelist_to_diffnet survey_to_diffnet
Retrive threshold levels from the exposure matrixthreshold
Difference in Time of Adoption (TOA) between individualstoa_diff
Time of adoption matrixtoa_mat
Apply a function to a graph considering non-diagonal structural zerostransformGraphBy transformGraphBy.dgCMatrix transformGraphBy.diffnet
Comparisons at dyadic levelvertex_covariate_compare
Computes covariate distance between connected verticesmahalanobis minkowski p-norm vertex_covariate_dist vertex_mahalanobis_dist
Computes weighted varianceweighted_var wvar