linear.kernel: Integration with respect to locally weighted kernel

View source: R/tweetfunctions.R

linear.kernelR Documentation

Integration with respect to locally weighted kernel

Description

Integration with respect to locally weighted kernel

Usage

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
)

Arguments

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

Value

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)

Functions

  • power.kernel: Power-law kernel

  • integral.memory.kernel: Integral of the kernel

See Also

memory.pdf


seismic documentation built on May 21, 2022, 1:05 a.m.