This function performs the iteration step. Detailed description can be found in Chazin et al. 2019, Supplemental Materials 1.

iteration(paths, U, bandwidth)

Arguments

paths

A list of data frames, where each frame contains the data for one individual. Every data frame should have two columns with names 'distance' and 'oxygen'.

U

A list of vectors. Each element in the list is a vector of integers, corresponding to individuals considered in one group.

bandwidth

Denotes the order of the bandwidth that should be used in the estimation process. bandwidth = k will mean that the bandwidth is n^k.

Value

A list containing the following components:

S1

A set of individuals who are in the cluster

U

A set of individuals to be used in the next iteration.

Examples

armenia_split = split(armenia,f = armenia$ID) band = -0.33 p = length(armenia_split) iteration(armenia_split,1:p,band)
#> $S1 #> [1] 5 #> #> $U #> [1] 2 4 15 1 6 24 22 13 7 10 16 12 3 8 23 9 17 20 18 19 14 11 21 #>