- New function
degree_adoption_diagnostic()analyzes the correlation between network centrality measures (in-degree and out-degree) and time of adoption to identify whether opinion leaders were supporters or opposers in diffusion processes. The function supports multi-diffusion objects, undirected networks, and includes bootstrap confidence intervals.
-
New methods for simulating multi-diffusion models.
-
It is now possible to simulate diffusions with general disadoption functions.
- Minor changes to testing (skip warnings).
- Adressing
roxygen2issue #1491
-
Solved warning and errors reported by CRAN before the package was archived.
-
New S3 generic functions
is_self,is_multiple,is_valued, andis_undirectedallow querying graph information for some methods. -
Fixed bug in
diag_expand. Graphs with self ties were not transformed correctly (diagonals were excluded.)
- Replaced
getMethod("t"...)bytresponding to changes in theMatrixpackage.
-
netdiffuseR has now a logo!
-
Making updates after changes in knitr and Matrix.
-
Fixing a new issue regarding structural equivalence calculation. In the new version, the function has been fully ported to R, which should avoid problems related to the C++ code.
-
As documented,
struct_equivnow returns he euclidean distance matrix (it was not doing that).
- Getting netdiffuseR back to CRAN. We have fixed issues that arise from the next big CRAN release, in particular, matrices are now arrays. That was creating issues throughout the package (now fixed).
- Repaired broken link in bootnet.
- This version has no user level visible changes.
-
Changing
PImacros in C++ code as requested by RcppCore. -
Setting 3.5 seed version for tests so that test won't break following message from CRAN.
-
diffregprovides a wrapper ofglmto run lagged regression models. -
Default colors for
plot_diffnet2,plot_infectsucept, and others are now selected from theviridisR package, which provides perceptually uniform and colorblind proof colors.
-
plot_diffnet2now has the correct scaling in nodes positions. -
rdiffnet_multiplecallslibrary(netdiffuseR)when using multicore.
-
arrow.widthinplot_threshold.defaultnow set to be equal tonslices(graph)/80. -
curvedoption passed toplot_._threshold.default. -
The c++ function
edges_arrownow returns two different elements (the edge, and the arrow).
-
rdiffnetnow allows passing scalars forthreshold.dist, more over, the user can also ask the function to just warn when there is no diffusion instead of returning with error. -
plot.diffnet,plot_diffnet,plot.diffnet_mentor, andplot_diffnet2use igraph for plotting. Also, users can now pass "degree" for -vertex.size- (vertex.cex not used anymore), allowing to "automatically" scale vertices by (in/out/.)degree. Also, plotting arguments like vertex.* or edge.* are standarized so these match igraph. -
plot_diffnethas a new parameter:background. -
rdiffnet_multiple, a wrapper ofrdiffnet, allows performing simulations studies by running simulating multiple diffusion networks usingrdiffnet. -
exposurehas a new parameter:lags. By default lags = 0, returns a lagged exposure matrix.
-
igraph_to_diffnetwas failing with the graph had no weights. -
drop_isolatedwas not behaving well for diffnet objects. -
vertex_covariate_distwas incorrectly specified. Only the default p=2 were OK. Now fixed and the tests/ folder includes a tests on this. -
plot_diffnet2was not passingcolor.ramptodrawColorKey. Now fixed. -
plot.diffnet_mentorhad a bug. Uncesary permutation of vertices was done, but it actually had no visible effect. Similar problem was corrected indiffnet_to_igraph, and other plot methods using igraph for plotting.
-
Replacing some C++ functions by R functions in cases in which there was no decrease in performance.
-
plot_diffnetfunction now has smaller margins, so looks more appealing. -
New examples in vignettes "netdiffuseR showcase: Medical Innovations", and "Simulating diffusion networks: Using the
rdiffnetfunction".
-
network_to_diffnet,diffnet_to_networkcoercion between diffnet and network objects. -
networkDynamic_to_diffnet,diffnet_to_networkDynamccoercion between diffnet and networkDynamic objects.
new_diffnetandas_diffnetnow receive static networks as well.
-
diffnet_to_igraphwas copying over a single adjacency matrix, which did a difference in dynamic networks. -
diffnet_to_igraphwas not considering loops correctly. -
In unexpected situations
egonet_attrswas crashing.
-
bootnetimplements network bootstrapping based on Snijders and Borgatti (1999) -
mentor_matchingimplements Valente and Davis (1999) Mentor matching algorithm. including a plot method. -
approx_geodesican alternative toigraph::distancesandsna::geodist. computes geodesics up to a certain number of steps and returns a sparse matrix. -
matrix_compareEfficiently compares two sparse matrices looking only at the valued cells. -
as_dgCMatrixCoerce matrix-like objects into dgCMatrix objects (sparse matrices from theMatrixpackage). -
fitbassFits the Bass Diffusion Model to an observed vector of cumulative adopters. The estimation is done viastats::nls. -
netmatchandnetmatch_prepare(on development) implement matching estimators with network data.
-
dgrreturned with error whenself == TRUE -
In some calls to
igraph::graph_from_adj...sorting of vertices was not preserved. -
The
matrixmethod inegonet_attrswas passing a list of vertices instead of the attributes. Fixed. -
transformGraphBywas returning with error when the time periods ranged other than 1, 2, ...
-
rgraph_eris now significantly faster (orders of magnitude compare to previous versions).rgraph_bais faster too. -
morannow returns the sd, expected and p-value. -
exposurenow receives static graphs inalt.graphwith a warning. -
rewire_graphnow also uses QAP. This affects directly tostructu_test.
-
The title of the package is now Analysis of Diffusion and Contagion Processes on Networks.
-
The function
struct_testnow allows other types of graphs. Before it only supporteddiffnetobjects. -
The function
rewire_graphgains a new argument for the algorithm "swap". Now to ensure aperiodicity in MCMC a chance of skiping a rewire has been included. -
The function
n_rewiresnow has a default of 20 (before it was 100). This is based on Ray et al (2012) (more details in the manual). -
The function
rgraph_bagains a new argument,self=TRUE. By default behaves as before following Bollobas, but now can deviate to generate graphs with no autolinks. -
In
rgraph_ba, the argumentetaallows implementing De Almeida et al. (2013) Scale-free homophilic networks. -
The functions
exposureanddgrare now pure R code (C++ functions were replace since there were no significant speed gains). -
diffnetclass objects now have two new meta-values: name and behavior. -
Elements -graph-, -toa-, -adopt- and -cumadopt- in
diffnetclass objects have lost their dimnames (more efficient storage). -
classify_adoptersnow always includes Non-Adopters.
-
vertex_covariate_distcomputes distances between vertices using both the graph and a matrix of length nxK. -
vertex_mahalanobis_distcomputes mahalanobis distance between vertices (as above). -
struct_test_asympan asymptotic approximation ofstruct_test(not recomended). -
ego_variancecomputes a pseudo variance at the ego level (aux function forstruct_test). -
transformGraphByapplies a function that transforms a graph considering structural zeros given by groups. Similar to the idea of the -by- option instruct_equiv. -
read_ucinetread UCINET binary files (both header and graph file). Still work in progress. -
plot.diffnet_degSeqmethod allows visualizing degree sequence as log-log plots (default). -
diag_expandcreates a single adjacency matrix from a dynamic graph. -
summary.diffnet_adoptChangemethod generates a summary table of the df generated byselect_egoalter. -
permute_graphpermutes the values of an adjacency matrix (Conditional Uniform Graph). -
rewire_qapgenerates isomorphic graphs by "changing the labels".
-
^.diffnetmethod was rasing to +1 power, e.g.diffnet^2was actuallydiffnet^3. -
/.diffnetwas not working. -
plot_diffnetwas computing the coordinates of the cells wrongly. Most of the time causing adding figures outside of the plotting area. -
The
c.diffnet_struct_testmethod was not updating thep.value. -
The function
edgelist_to_adjmatwas not processing correctly undirected graphs when the edgelist represented a lower triangular matrix. -
The function
survey_to_diffnethad an issue processin dyn graph attrs returning errors. Now fixed. -
The function
select_egoalterreturned error whengraphwas an array. -
The method
[[<-.diffnetfailed when replacing a dynamic attribute with aNULLvalue (e.g.dn[["my_dyn_att"]] <- NULL).
-
Fixed bug in
struct_equiv: Whengroupvarwas a list (dynamic attr), the function returned error. -
Fixed bug in
rewire_graph.array: Returned error whenalgorithm="swap" -
Fixed bug in
rewire_graph: The optioncopy.firstwas not been applied correctly. -
In
hist.diffnet_struct_test:...now passed tohist.default. -
Fixed bug on
egonet_attrs: The matrix method was returning with error.
-
plot_infectsusceptincludes 2D kernel smoother viaMASS::kde2d. -
infection,susceptibilityandthresholdnow reportNAfor non-adopters or excluded variables. -
egonets_attrsnow has new argument:self.attrsallows including ego's attributes as part of the outcome so it can be used by the user. -
plot_diffnetnow usesigraph::plot.igraphfor plotting instead -
thresholdgains a new argument:lagsnow users can define threshold as exposurelagstime periods prior to the time of adoption. By default is 0 so its exposure at the time of adoption.
-
New method
c.diffnet_struct_test: A wrapper ofboot:::c.boot. -
diffusionMapcomputes the required matrix to be used withimage-like functions mapping a vertex covariate given a graph structure. -
n_rewires: computes a suggested number of rewires per step in order to attain unbiased graph samples. -
diffnetLapply: Apply throught periods on diffnet objects. -
Several new methods for the class
diffnet. Now users can applystr,dimnames(socolnamesandrownames),t,&,|,dimand%*%. -
drawColorKey: Handy function to draw a color key in the current plot. -
classify_adopters: As in Valente (1995), depending on time of adoption, adopters are classified as early adopters, early majority, late majority, and laggards. The function introduces a new class and has methods forftableandplot. -
rescale_vertex_igraph: Helper function to fix the size of vertex when callingplot.igraphso that the size is proportional to the x-axis.
-
Bug fixed on
edgelist_to_adjmat: Counting number of vertices is now done right afterrecode. (Reported by Tom) -
Fixed bug in
diffnet.attrs(..., as.df=TRUE). ids were wrongly retrieved. -
Fixed bugs for
rgraph_ba_cpp: Degree of new vertices was not changing apropiately. This only was an issue whenm>1. -
Fixed bugs for the
as_diffnetmethod for arrays. -
Fixed bugs in
rewire_graph. Indexing of the jth component (when rewiring) was not been made correctly (now it does). Also, when rewiring, the new endpoints were truncated to n-1 (now fixed). -
Fixed bugs for
as_diffnet: When a dynamic graph was passed with slices names different from the time periods, the slices names were kept. Now these are replaced bymeta$pers.
-
Support for
int64_tinRcppArmadillonow allows for creating/reading adjacency matrices with more than 4 billion elements (big graphs). -
In
edgelist_to_adjmatuse.incompletehas been replaced bykeep.isolatedwhich makes more sense for naming. Incomplete cases ontimesorweightsare still ignored (as these cannot be processed by the c++ 'engine'). (Reported by Tom) -
In
edgelist_to_adjmattimeshas been replaced byt0andt1. So now the user can import graphs with spells. -
Added new elements to the
diffnet_struct_testclass:p.value,t0,mean_t, andR. All these were available before either to be computed or retrieved from thebootlist at the class. -
New argument for
threshold. Now, by default, threshold levels are not computed for adopters in the first time period as this can be a biased estimate. If the user wants to compute such, he/she can setinclude_censored=TRUE. -
Attributes in diffnet objects are now stored as data frames (instead of matrices). This affects the function
diffnet.attrs, andegonet_attrsas these use attributes directly. (Requested by Tom) -
New features for the
rewire_graphfunction. In particular,pcan now be a vector of lengthT, so each slice can have different rewiring prob., and the new optioncopy.firstwhich allows to recycle the first rewired slice (see details). -
New features for the
exposurefunction. Whengraphis of class diffnet, the function acceptsattrsequal to the name of some the graph's attributes. Also,alt.graphcan be specified asse, which will be replaced by the inverse of the structural equivalence. Whenvalued=FALSEthe function will switch it toTRUEand warn the user. -
New argument for
struct_equivandexposure,groupvar. This new option provides a convenient way of calculating structural equivalence and exposure clusterized by group. Specially useful when there are different communities in a graph. See examples in the manual. -
as_diffnetnow has an internal function,check_as_diffnet_attrs, to check input attributes dimensions and coerce them into proper class/structure. Valid attributes are now documented in the function's manual. -
New arguments for
edges_coords:devandranallow including device + margins aspec ratio and plotting area y/x limits for improved aspect ratio computation. -
New internal function
edges_arrow: Computes the coordinates of a 4 points polygon allowing to draw pretty arrows considering aspec ratio of device, margins and y/x. -
Geodesic distances are now computed using
igraph::distancesinstead ofsna::geodistas it is more flexible and faster. -
New arguments for
plot_threshold:vertex.sides,vertex.lab.cex,vertex.lab.adj,vertex.lab.col,vertex.rot,jitter.factor, andjitter.amountto give more control. -
New internal function
vertex_coords: Creates polygons of any given number of sides considering aspec ratio of both x/y and device. -
New features for
rdiffnet.seed.graphcan be either a function that generates a random graph, a character string (as before) indicating the class of graph to generate, or any other class of graph (either static or dynamic) as specified innetdiffuseR-graphs.seed.nodescan now be a vector with indices pointing to the initial adopters. -
The rewiring algorithm for
rgraph_wshas been replaced with arewire_wswhich has been implemented as it was presented in Watts and Strogatz (1998).
-
New function:
survey_to_diffnet. This function allows importing network nomination data (in survey fashion) of both types, cross-section and panel formats (static network only varying adoption, or dynamic network varying attributes and network structure simultaneously). -
New function:
edgelist_to_diffnet. Similar tosurvey_to_diffnet, this function reads diffusion networks from an adjacency matrix and a vertex attributes data frame. Both the attributes and the edgelist can be static or dynamic. -
New method:
as.array.diffnet. -
New functions:
read_pajekandread_ucinet. Still on development. -
New functions:
nverticesandnedgesreturn the number of vertices and edges that a graph has. This can be applied to any class of graph accepted by the package. -
New indexing methods via
[[.diffnet,[[<-.diffnet, for network attributes and[.diffnetand[<-.diffnetfor adjacency matrix. The functiondiffnet.attrs<-will be deprecated for the next CRAN release. The functiondiffnet.subset.slicesis now not exported (internal use), so the user needs to use the[.diffnetmethod instead. -
New concatenating method
c.diffnetfor diffnet objects. This method allows 'adding up' diffnet objects. -
New print method for
diffnet_se, objects returned bystruct_equiv. -
New function
diffnet_to_igraph. -
New rewiring algorithm,
rewire_swapimplements the edge-switch algorithm in an efficient way. This preserves degree sequences.
- First CRAN version.