Integration with respect to locally weighted kernel
linear.kernel(t1, t2, ptime, slope, c = 0.0006265725)power.kernel(
t1,
t2,
ptime,
share.time,
slope,
theta = 0.2314843,
cutoff = 300,
c = 0.0006265725
)
integral.memory.kernel(
p.time,
share.time,
slope,
window,
theta = 0.2314843,
cutoff = 300,
c = 0.0006265725
)
a vector of integral lower limit
a vector of integral upper limit
the time (a scalar) to estimate infectiousness and predict for popularity
slope of the linear kernel
the constant density when t is less than the cutoff
observed resharing times, sorted, share.time[1] =0
exponent of the power law
the cutoff value where the density changes from constant to power law
equally spaced vector of time to estimate the infectiousness, p.time[1]=0
size of the linear kernel
linear.kernel
returns the integral from vector t1 to vector t2 of
c*[slope(t-ptime) + 1];
power.kernel
returns the integral from vector t1 to vector 2 of c*((t-share.time)/cutoff)^(-(1+theta))[slope(t-ptime) + 1];
integral.memory.kernel
returns the vector with ith entry being integral_-inf^inf phi_share.time[i]*kernel(t-p.time)
power.kernel
: Power-law kernel
integral.memory.kernel
: Integral of the kernel