get_ith_local_neighbors: A function to obtain the local neighbors based on...

View source: R/local_helpers.R

get_ith_local_neighborsR Documentation

A function to obtain the local neighbors based on dissimilarity matrices from orthogonal projections.

Description

internal function. This function is used to obtain the local neighbors based on dissimilarity matrices from orthogonal projections. These neighbors are obatin from an orthogonal projection on a set of precomputed neighbors. This function is used internally by the mbl fucntion. ortho_diss(, .local = TRUE) operates in the same way, however for mbl, it is more efficient to do the re-search of the neighbors inside its main for loop

Usage

get_ith_local_neighbors(
  ith_xr,
  ith_xu,
  ith_yr,
  ith_yu = NULL,
  diss_usage = "none",
  ith_neig_indices,
  k = NULL,
  k_diss = NULL,
  k_range = NULL,
  spike = NULL,
  diss_method,
  pc_selection,
  ith_group = NULL,
  center,
  scale,
  ...
)

Arguments

ith_xr

the set of neighbors of a Xu observation found in Xr

ith_xu

the Xu observation

ith_yr

the response values of the set of neighbors of the Xu observation found in Xr

ith_yu

the response value of the xu observation

diss_usage

a character string indicating if the dissimilarity data will be used as predictors ("predictors") or not ("none").

ith_neig_indices

a vector of the original indices of the Xr neighbors.

k

the number of nearest neighbors to select from the already identified neighbors

k_diss

the distance threshold to select the neighbors from the already identified neighbors

k_range

a min and max number of allowed neighbors when k_diss is used

spike

a vector with the indices of the observations forced to be retained as neighbors. They have to be present in all the neighborhoods and at the top of neighbor_indices.

diss_method

the ortho_diss() method

pc_selection

the pc_selection argument as in ortho_diss()

ith_group

the vector containing the group labes of ith_xr.

center

center the data in the local diss computation?

scale

scale the data in the local diss computation?

Value

a list: itemize

Author(s)

Leonardo Ramirez-Lopez


resemble documentation built on April 21, 2023, 1:13 a.m.