Skip to contents

Select one or two actors that will perform a (simultaneous) ministep.

Usage

ts_select(net, steps = 1, dist1 = NULL, modet1 = "degree")

Arguments

net

matrix, the adjacency matrix representing the relations between actors. Valid values are 0 and 1.

steps

numeric, do we want to sample one or two actors

dist1

numeric, minimal path length between ego1 and ego2 at time1 in order to be allowed to start a coordination. If NULL just simultaneity. If not NULL steps is set to 2.

modet1

string indicating the type of ties being evaluated at time1. "degree" considers all ties as undirected. "outdegree" only allows directed paths starting from ego1 and ending at ego2. "indegree" only allows directed paths starting from ego2 and ending at ego2.

Value

vector of length one or two, with the actors being sampled.

Details

This function selects one actor (steps=1) or two actors (steps=2) at random that are part of the network. If it is not possible to select two actors to start a coordination (not connected dyads at time1), the function will tell you so.

Examples

ts_select(net=ts_net1, steps=1)
#> [1] 1
ts_select(net=ts_net1, steps=2)
#> [1] 5 2
ts_select(net=ts_net1, dist1=2, modet1="degree")
#> [1] 4 6