sp: sp

Description Usage Arguments Value

View source: R/strategicplayers.R

Description

Takes in the number of intervention subjects you wish to identify, geodesic distances, targets, avoiders, and a parameter that prioritizes avoiding vs targetting, and returns the indecies of the strategic players

Usage

1
sp(n.players, gd, targets, avoiders, theta = 0.5, n.loops = 1000)

Arguments

n.players

the number of intervention subjects you wish to identify

gd

a matrix of geodesic distances for the network of interest

targets

a vector of indicies of the people you want to spread the intervention to

avoiders

a vector of indicies of the people you don't want to spread the intervention to

theta

a number between 0 and 1 which weights the distance metric, 1 only prioritizes closeness to targets, 0 only prioritizes maximizing distance from avoiders. Any number between 0 and 1 will be a compromise of these two goals.

n.loops

the number of loops to run, the more loops you run the more likely you are to identify the optimal set of strategic players

Value

returns the indicies for strategic players


strategicplayers documentation built on May 2, 2019, 2:13 a.m.