LinCDESplit: LinCDESplit

View source: R/RcppExports.R

LinCDESplitR Documentation

LinCDESplit

Description

This function computes the approximately optimal split in C++. A split is invalid if the sample size on the left or right of the split falls below 10

Usage

LinCDESplit(X, yIndex, cellProb, z, covMatrixInv, splitPoint, numberBin)

Arguments

X

input matrix, of dimension nobs x nvars; each row represents an observation vector.

yIndex

discretized response vector, of length nobs.

cellProb

cell probability matrix, of dimension nobs x numberBin.

z

sufficient statistics matrix, of dimension numberBin x number of sufficient statistics.

covMatrixInv

inverse of psi” (number of sufficient statistics x number of sufficient statistics).

splitPoint

a candidate split list (length nvars). Each element is a vector corresponding to a certain variable's candidate splits (including the left and right end points).

numberBin

the number of bins for response discretization.

Value

The function returns splitVar: the index of the variable to split at; splitVal: the cut-point of the split; improvement: the contribution of the split to the objective.


ZijunGao/LinCDE documentation built on Jan. 2, 2023, 11:14 p.m.