Title: Pick and Plot Key Opinion Leaders from a Network Given Constraints
Version: 0.0.1
Description: Assists researchers in choosing Key Opinion Leaders (KOLs) in a network to help disseminate or encourage adoption of an innovation by other network members. Potential KOL teams are evaluated using the ABCDE framework (Neal et al., 2025 <doi:10.31219/osf.io/3vxy9_v1>). This framework which considers: (1) the team members' Availability, (2) the Breadth of the team's network coverage, (3) the Cost of recruiting a team of a given size, and (4) the Diversity of the team's members, (5) which are pooled into a single Evaluation score.
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.3.1
Depends: R (≥ 2.10)
Imports: igraph, methods, utils
Suggests: knitr, rmarkdown
URL: https://github.com/zpneal/KOLaide
BugReports: https://github.com/zpneal/KOLaide/issues
NeedsCompilation: no
Packaged: 2025-05-02 20:21:05 UTC; zacharyneal
Author: Zachary Neal ORCID iD [aut, cre], Marcus Dockerty [aut], Jennifer Watling Neal [ctb], Elise Cappella [ctb]
Maintainer: Zachary Neal <zpneal@msu.edu>
Repository: CRAN
Date/Publication: 2025-05-06 08:50:02 UTC

Pick key opinion leaders from a network given constraints

Description

Pick key opinion leaders from a network given constraints

Usage

pick_kols(
  network,
  tosource = TRUE,
  goal = "diffusion",
  m = 1,
  range = c(1, 1),
  top = NULL,
  include = NULL,
  exclude = NULL,
  attribute = NULL,
  alpha = 0.9,
  beta = 0.9,
  file = NULL
)

Arguments

network

a unipartite unweighted network as an adjacency matrix or igraph object

tosource

logical: edges point toward a source of information

goal

string: goal for the KOL team (either "diffusion" or "adoption")

m

integer: KOL team centrality parameter (m == 1 is equivalent to simple degree centrality)

range

vector: a vector of length 2 containing the minimum and maximum number of KOLs on a team

top

numeric: restrict scope to the top nodes with the highest degree, closeness, or betweenness (useful for large networks)

include

vector: names or indices of nodes that must be included on the KOL team

exclude

vector: names or indices of nodes that can not be included on the KOL team

attribute

string or vector: if network is an igraph object, the name of a node attribute. if network is an adjacency matrix, a vector containing a node attribute.

alpha

numeric: parameter to control relative weight of breadth and diversity in overall evaluation of KOL teams (0.5 \leq \alpha \leq 1)

beta

numeric: parameter to control weight of team size in overall evaluation of KOL teams (0 \leq \beta \leq 2)

file

string: filename to write a sorted list of possible KOL teams as a CSV.

Details

When seeking to diffuse a piece of information or encourage adoption of a behavior, it is often useful to recruit the assistance of key opinion leaders (KOL) in a network. pick_kols facilitates selecting members of a KOL team by returning a dataframe of possible teams. The selection of a KOL team often depends on several factors, which this function summarizes as ABCDE:

Evaluating KOL Teams

Potential KOL teams are evaluated on the basis of breadth (B), Cost (C), and (if attribute is provided), Diversity (D) using

\frac{B}{C^\beta} \mbox{ or } \frac{B^\alpha D^{1-\alpha}}{C^\beta}

The \alpha parameter can take values 0.5 < \alpha < 1 and controls the weight placed on breadth relative to diversity. Smaller values of \alpha place less weight on breadth and more weight on diversity, while larger values of \alpha place more weight on breadth and less weight on diversity. The default (\alpha = 0.9) places the majority of weight on the breadth of the network that KOL teams cover, while still considering the team's diversity (primarily as a tie-breaker).

The \beta parameter can take values 0 < \beta < 2 and controls the cost of larger KOL team members. Smaller values of \beta imply decreasing marginal costs, while larger values of \beta imply increasing marginal costs. The default (\beta = 0.9) assumes that team members have a slight diminishing marginal cost (i.e. the cost of each additional team member is slightly smaller than the previous one).

Interpreting Edge Direction

If network is a directed network, then tosource controls how the direction of edges is interpreted:

Value

A sorted list containing a data frame of possible KOL teams with their characteristics, the network, m, goal, and (optionally) attribute

Examples

network <- igraph::sample_smallworld(1,26,2,.2)  #An example network
igraph::V(network)$name <- letters[1:26]  #Give the nodes names
igraph::V(network)$gender <- sample(c("M","F"),26,replace=TRUE)  #Give the nodes a "gender"
teams <- pick_kols(network,              #Find KOL teams in `network`
                   m = 2,
                   range = c(2,4),       #containing 2-4 members
                   attribute = "gender", #that are gender diverse
                   goal = "diffusion")   #and can help diffuse information
teams$teams[1:10,]  #Look at the top 10 teams

Plot a KOL team in a network

Description

Plot a KOL team in a network

Usage

plot_kols(
  KOL,
  team = 1,
  kol = "red",
  reachable = "green",
  attribute = TRUE,
  ...
)

Arguments

KOL

a KOL object generated by pick_kols()

team

numeric: number of team in KOL to plot

kol

color to mark KOLs

reachable

color to mark nodes reachable by KOLs

attribute

boolean: if a node attribute was used to measure KOL team diversity, should nodes be colored accordingly

...

arguments passed to igraph plot function

Value

an igraph plot

Examples

network <- igraph::sample_smallworld(1,26,2,.2)  #An example network
teams <- pick_kols(network, m = 2)  #Find KOL teams
plot_kols(teams,
          vertex.label = NA,
          vertex.frame.width = 3)