View source: R/tweetfunctions.R
linear.kernel | R Documentation |
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 )
t1 |
a vector of integral lower limit |
t2 |
a vector of integral upper limit |
ptime |
the time (a scalar) to estimate infectiousness and predict for popularity |
slope |
slope of the linear kernel |
c |
the constant density when t is less than the cutoff |
share.time |
observed resharing times, sorted, share.time[1] =0 |
theta |
exponent of the power law |
cutoff |
the cutoff value where the density changes from constant to power law |
p.time |
equally spaced vector of time to estimate the infectiousness, p.time[1]=0 |
window |
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
memory.pdf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.