Releases: USCCANA/netdiffuseR
CRAN v1.22.6
Full Changelog: v1.21.0...v1.22.6
CRAN Release 1.19.0
Changes in netdiffuseR version 1.19.0 (2017-10-16)
New functions and features
-
rdiffnet
now 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_diffnet2
use 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_diffnet
has a new parameter:background
. -
rdiffnet_multiple
, a wrapper ofrdiffnet
, allows performing simulations studies
by running simulating multiple diffusion networks usingrdiffnet
. -
exposure
has a new parameter:lags
. By default lags = 0, returns a lagged
exposure matrix.
Bug fixes
-
igraph_to_diffnet
was failing with the graph had no weights. -
drop_isolated
was not behaving well for diffnet objects. -
vertex_covariate_dist
was incorrectly specified. Only the default p=2
were OK. Now fixed and the tests/ folder includes a tests on this. -
plot_diffnet2
was not passingcolor.ramp
todrawColorKey
. Now fixed. -
plot.diffnet_mentor
had a bug. Uncesary permutation of vertices was done,
but it actually had no visible effect. Similar problem was corrected in
diffnet_to_igraph
, and other plot methods using igraph for plotting.
Other changes
-
Replacing some C functions by R functions in cases in which there
was no decrease in performance. -
plot_diffnet
function now has smaller margins, so looks more appealing. -
New examples in vignettes "netdiffuseR showcase: Medical Innovations", and
"Simulating diffusion networks: Using therdiffnet
function".
CRAN Release 1.18.0
Changes in netdiffuseR version 1.18.0 (2017-07-16)
New functions
-
bootnet
implements network bootstrapping based on Snijders and Borgatti (1999) -
mentor_matching
implements Valente and Davis (1999) Mentor matching algorithm.
including a plot method. -
approx_geodesic
an alternative toigraph::distances
andsna::geodist
.
computes geodesics up to a certain number of steps and returns a sparse
matrix. -
matrix_compare
Efficiently compares two sparse matrices looking only at the valued
cells. -
as_dgCMatrix
Coerce matrix-like objects into dgCMatrix objects (sparse matrices
from theMatrix
package). -
fitbass
Fits the Bass Diffusion Model to an observed vector of cumulative
adopters. The estimation is done viastats::nls
. -
netmatch
andnetmatch_prepare
(on development) implement matching estimators
with network data.
Bugs Fixes
-
dgr
returned with error whenself == TRUE
-
In some calls to
igraph::graph_from_adj...
sorting of vertices was not preserved. -
The
matrix
method inegonet_attrs
was passing a list of vertices instead of
the attributes. Fixed. -
transformGraphBy
was returning with error when the time periods ranged other than
1, 2, ...
New Features
-
rgraph_er
is now significantly faster (orders of magnitude compare to
previous versions).rgraph_ba
is faster too. -
moran
now returns the sd, expected and p-value. -
exposure
now receives static graphs inalt.graph
with a warning. -
rewire_graph
now also uses QAP. This affects directly tostructu_test
.
CRAN release version 1.17.0
Changes in netdiffuseR version 1.17.0 (2016-11-10)
New features and changes
- The title of the package is now Analysis of Diffusion and Contagion Processes
on Networks. - The function
struct_test
now allows other types of graphs. Before it only
supporteddiffnet
objects. - The function
rewire_graph
gains 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_rewires
now 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_ba
gains a new argument,self=TRUE
. By default behaves
as before following Bollabas, but now can deviate to generate graphs with no
autolinks. - In
rgraph_ba
, the argumenteta
allows implementing De Almeida et al. (2013)
Scale-free homophilic networks. - The functions
exposure
anddgr
are now pure R code (C functions were
replace since there were no significant speed gains). diffnet
class objects now have two new meta-values: name and behavior.- Elements -graph-, -toa-, -adopt- and -cumadopt- in
diffnet
class objects
have lost their dimnames (more efficient storage). classify_adopters
now always includes Non-Adopters.
New functions
vertex_covariate_dist
computes distances between vertices using both the graph
and a matrix of length nxK.vertex_mahalanobis_dist
computes mahalanobis distance between vertices (as above).struct_test_asymp
an asymptotic approximation ofstruct_test
(not recomended).ego_variance
computes a pseudo variance at the ego level (aux function for
struct_test
).transformGraphBy
applies a function that transforms a graph considering
structural zeros given by groups. Similar to the idea of the -by- option
instruct_equiv
.read_ucinet
read UCINET binary files (both header and graph file). Still
work in progress.plot.diffnet_degSeq
method allows visualizing degree sequence as log-log
plots (default).diag_expand
creates a single adjacency matrix from a dynamic graph.summary.diffnet_adoptChange
method generates a summary table of the df
generated byselect_egoalter
.permute_graph
permutes the values of an adjacency matrix (Conditional
Uniform Graph).rewire_qap
generates isomorphic graphs by "changing the labels".
Bug fixes
^.diffnet
method was rasing to 1 power, e.g.diffnet^2
was actually
diffnet^3
./.diffnet
was not working.plot_diffnet
was computing the coordinates of the cells wrongly. Most of the
time causing adding figures outside of the plotting area.- The
c.diffnet_struct_test
method was not updating thep.value
. - The function
edgelist_to_adjmat
was not processing correctly undirected
graphs when the edgelist represented a lower triangular matrix. - The function
survey_to_diffnet
had an issue processin dyn graph attrs returning
errors. Now fixed. - The function
select_egoalter
returned error whengraph
was an array. - The method
[[<-.diffnet
failed when replacing a dynamic attribute with
aNULL
value (e.g.dn[["my_dyn_att"]] <- NULL
).
CRAN release version 1.16.7
Bug fixes
- Fixed bug in
struct_equiv
: Whengroupvar
was 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.first
was 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.
New features and changes
plot_infectsuscept
includes 2D kernel smoother viaMASS::kde2d
.infection
,susceptibility
andthreshold
now reportNA
for non-adopters
or excluded variables.egonets_attrs
now has new argument:self.attrs
allows including ego's attributes
as part of the outcome so it can be used by the user.plot_diffnet
now usesigraph::plot.igraph
for plotting insteadthreshold
gains a new argument:lags
now users can define threshold as
exposurelags
time periods prior to the time of adoption. By default is 0
so its exposure at the time of adoption.
New functions
- New method
c.diffnet_struct_test
: A wrapper ofboot:::c.boot
. diffusionMap
computes the required matrix to be used with
image
-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
(socolnames
andrownames
),t
,&
,|
,dim
and%*%
. 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 forftable
andplot
.rescale_vertex_igraph
: Helper function to fix the size of vertex when calling
plot.igraph
so that the size is proportional to the x-axis.
CRAN release v1.16.5
Preparing for CRAN after PR to RcppArmadillo
v1.16.4.4.9500
Changing version naming (.9500 for dev version)
Pre-workshop
Pre-release. Changes from CRAN to this point can be reviewed here: https://github.com/USCCANA/netdiffuseR/blob/c7c25c143a05b209bbb9b8b4c10b242179c7c79d/NEWS.md
Binary versions can be installed either within R:
> install.packages("netdiffuseR_1.16.3.29.zip", repos=NULL)
if windows, or, if OS X:
> install.packages("netdiffuseR_1.16.3.29.tgz", repos=NULL)
or using the command line, for the case of windows:
$ R CMD INSTALL netdiffuseR_1.16.3.29.zip