-
Notifications
You must be signed in to change notification settings - Fork 0
/
contents.qmd
135 lines (73 loc) · 2.62 KB
/
contents.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
---
title: "netdiffuseR at Sunbelt 2019"
author: "Thomas W. Valente and George G. Vega Yon"
date: "June 18, 2019"
output: html_document
---
# Introduction
## Today's objectives:
1. Read data into netdiffuseR
2. Simulate diffusion networks
3. Use the visualization tools
4. Use statistical inference tools
## Dynamic of work
1. We will introduce a concept/function
2. We will provide examples
3. Attendees will be asked to answer a couple of questions using netdiffuseR
# Simulation of diffusion networks: rdiffnet
* Disease spreading
* Complex contagion
* Network interventions: Mentor matching
* Example simulating a thousand networks by changing threshold levels.
The final prevalence, or hazard as a function of threshold levels.
## Problems
1. Given the following types of networks: Small-world, Scale-free, Bernoulli,
what set of $n$ initiators maximizes diffusion?
# Reading networks: survey_to_diffnet
* Survey data
* Static networks
* From other formats
## Problems
2. Read in all the 3 different networks objects in ... and create diffnet
objects. A fake dynamic survey, an sns network and an igraph network.
(hint: All 3 networks should result in the same diffnet object)
3. With the new diffnet object, apply the same analysis as before.
Which strategy maximizes adoption?
# Computation of exposure terms
* Cohesive exposure
* Structural Equivalence Exposure
* Attribute weighted exposure
* Attribute similarity weighted exposure
## Problems
4. Using the network from problem 3, compute the following exposures:
a. Cohesive, and SE exposure
b. ABC attribute weighted
c. Similarity weighted exposure in gender and age.
# Statistical inference I
* Moran's I
* Permutation tests: Structural test
* Simple isomorphic
* When degree is endogenous
## Problems
5. Using the function `moran`, replicate the moran's I statistics
that the `summary` method reports when applied to the diffnet object
from problem 3.
6.
```{r}
library(netdiffuseR)
set.seed(1231)
net <- rgraph_ba(m=4L, t=199)
X <- dgr(net)
altnet <- vertex_covariate_compare(net, X, "distance")
altnet@x <- 1/altnet@x
g <- rdiffnet(seed.graph = net, t=10, threshold.dist = function(x) rbeta(1, 2, 10),
exposure.args = list(alt.graph = altnet, valued= TRUE))
```
# Statistical inference II
* Lagged Exposure Models: OLS and others
* Contemporaneous Exposure Models: Spatial Autoregressive Models
# Visualization of diffusion processes
*
# Other applications
* Bass diffusion models
* Network bootstrapping