get_dyadic_observations: For each dyad within each time period, this function counts...

Description Usage Arguments Details

View source: R/process-redcolobus-data.R

Description

Furthermore, this function conducts pre-network data permutations 'n_permutations' times (0 for no permutations) using the function 'permute_scan_data' For each permutation, 'flips_per_permutation' NNs are flipped. Then, the number of times Individual B was recorded as NN of Individual A is counted ('$n_Ind_NN_together_permuted')

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
get_dyadic_observations(
  ind_nn_df,
  presence_df,
  i_obs_min = 5,
  max_nn_dist = 5,
  n_permutations = 0,
  set_seed = 1209,
  ind_sex_permutation = c("Male", "Female"),
  nn_sex_permutation = c("Male", "Female"),
  flips_per_permutation = 1,
  ...
)

Arguments

ind_nn_df

Data frame with information on indviduals and nearest neighours from red colobus scan data. Created with 'prep_red_colobus_ind_nn_data()'

presence_df

Dataframe created with 'get_presence_rc'

max_nn_dist

The maximum distance for which an individual is still considered NN. Default is 5 (m)

n_permutations

How many permutations should be conducted?

ind_sex_permutation

default 'c("Male", "Female")'

nn_sex_permutation

default 'c("Male", "Female")'

flips_per_permutation

Number of iterations ('NN flips') per permutation

Details

Limitations: This function cannot (yet) permute within sex classes only. To achieve that, subset scandata and only include females or males before running the function. Set 'ind_sex_permutation' and 'nn_sex_permutation' to "Male"/"Female" respectively (although this should be working with default arguments)


urskalbitzer/daginR documentation built on Jan. 21, 2020, 1:26 a.m.