distance: distance

View source: R/strategicplayers.R

distanceR Documentation

distance

Description

Takes in the geodesic distances, targets, avoiders, a parameter that prioritizes avoiding vs targetting, and the current players and returns the strategic players distance metric

Usage

distance(gd, targets, avoiders, theta, players)

Arguments

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

players

the indicies of people who you have chosen for the intervention (a subset of targets)

Value

returns the distance metric for strategic players, which we want to maximize


MilesOtt/strategicplayers documentation built on Feb. 11, 2024, 9:14 a.m.