Learn R Programming

netdiffuseR (version 1.22.6)

select_egoalter: Calculate the number of adoption changes between ego and alter.

Description

This function calculates the 16 possible configurations between ego and alter over two time points in terms of their behavior and tie changes. From time one to time two, given a binary state of behavior, ego and alter can be related in 16 different ways. The function adopt_changes is just an alias for select_egoalter.

Usage

select_egoalter(graph, adopt, period = NULL)

adopt_changes(graph, adopt, period = NULL)

# S3 method for diffnet_adoptChanges summary(object, ...)

Value

An object of class diffnet_adoptChanges and data.frame

with \(n\times (T-1)\) rows and \(2 + 16\times 3\)

columns. The column names are:

time

Integer represting the time period

id

Node id

select_a_01, ..., select_a_16

Number of new links classified between categories 1 to 16.

select_d_01, ..., select_d_16

Number of remove links classified between categories 1 to 16.

select_s_01, ..., select_s_16

Number of unchanged links classified between categories 1 to 16.

Arguments

graph

A dynamic graph (see netdiffuseR-graphs).

adopt

\(n\times T\) matrix. Cumulative adoption matrix obtained from toa_mat.

period

Integer scalar. Optional to make the count for a particular period of time.

object

An object of class diffnet_adoptChanges.

...

Ignored.

Author

George G. Vega Yon & Thomas W. Valente

Details

The 16 possibilities are summarized in this matrix:

Alter
\(t-1\)NoYes
\(t-1\)\(t\)NoYesNoYes
EgoNoNo12910
Yes341112
YesNo561314
Yes781516

The first two Yes/No columns represent Ego's adoption of the innovation in \(t-1\) and \(t\); while the first two Yes/No rows represent Alter's adoption of the innovation in \(t-1\) and t respectively. So for example, number 4 means that while neither of the two had addopted the innovation in \(t-1\), both have in \(t\). At the same time, number 12 means that ego adopted the innovation in \(t\), but alter had already adopted in \(t-1\) (so it has it in both, \(t\) and \(t-1\)).

References

Thomas W. Valente, Stephanie R. Dyal, Kar-Hai Chu, Heather Wipfli, Kayo Fujimoto, Diffusion of innovations theory applied to global tobacco control treaty ratification, Social Science & Medicine, Volume 145, November 2015, Pages 89-97, ISSN 0277-9536 tools:::Rd_expr_doi("10.1016/j.socscimed.2015.10.001")

Examples

Run this code
# Simple example ------------------------------------------------------------
set.seed(1312)
dn <- rdiffnet(20, 5, seed.graph="small-world")

ans <- adopt_changes(dn)
str(ans)
summary(ans)

Run the code above in your browser using DataLab