estimate_coord_interval: estimate_coord_interval

Description Usage Arguments Value Examples

View source: R/estimate_coord_interval.R

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

1
2
3
4
5
6
7
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

1
2
3
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]]

LeonardoSaracino/CooRnet_projectSNA documentation built on Dec. 18, 2021, 4:33 a.m.