estimate_coord_interval: estimate_coord_interval

View source: R/estimate_coord_interval.R

estimate_coord_intervalR Documentation

estimate_coord_interval

Description

This function estimates a threshold in seconds that defines a coordinated link share. While it is common that multiple (pages/groups/account) entities share the same link, some tend to perform these actions in an unusually short period of time. Unusual is thus defined here as a function of the median co-share time difference. More specifically, the function ranks all co-shares by time-difference from first share and focuses on the behaviour of the quickest second share performing q% (default 0.5) URLs. The value returned is the median time in seconds spent by these URLs to cumulate the p% (default 0.1) of their total shares

Usage

estimate_coord_interval(
  ct_shares.df,
  q = 0.1,
  p = 0.5,
  clean_urls = FALSE,
  keep_ourl_only = FALSE
)

Arguments

ct_shares.df

the data.frame of link posts resulting from the function get_ctshares

q

parameter that controls the quantile of quickest URLs to be filtered. Default to 0.1 [0-1]

p

parameter that controls the percentage of total shares to be reached. Default to 0.5 [0-1]

clean_urls

clean up unnecessary url paramters and malformed urls, and keep just the URLs included in the original data set (default FALSE)

keep_ourl_only

restrict the analysis to ct shares links matching the original URLs (default=FALSE)

Value

a list containing two objects: summary statistics of q% quickest second share performing URLs, and a time in seconds corresponding to the median time spent by these URLs to cumulate the p% of their total shares

Examples

cord_int <- estimate_coord_interval(ct_shares.df = ct_shares.df, q=0.1, p=0.5, clean_urls=TRUE, keep_ourl_only=FALSE)
cord_int[[1]]
cord_int[[2]]


fabiogiglietto/CooRnet documentation built on Aug. 15, 2024, 7:16 p.m.