
Estimate the infectiousness of an information cascade
get.infectiousness(
share.time,
degree,
p.time,
max.window = 2 * 60 * 60,
min.window = 300,
min.count = 5
)
observed resharing times, sorted, share.time[1] =0
observed node degrees
equally spaced vector of time to estimate the infectiousness, p.time[1]=0
maximum span of the locally weight kernel
minimum span of the locally weight kernel
the minimum number of resharings included in the window
a list of three vectors:
infectiousness. the estimated infectiousness
p.up. the upper 95 percent approximate confidence interval
p.low. the lower 95 percent approximate confidence interval
Use a triangular kernel with shape changing over time. At time p.time, use a triangluer kernel with slope = min(max(1/(p.time
/2), 1/min.window
), max.window
).
# NOT RUN {
data(tweet)
pred.time <- seq(0, 6 * 60 * 60, by = 60)
infectiousness <- get.infectiousness(tweet[, 1], tweet[, 2], pred.time)
plot(pred.time, infectiousness$infectiousness)
# }
Run the code above in your browser using DataLab