Learn R Programming

STPGA (version 2.0)

CDMAX: CDMAX

Description

Calculate $$max(diag(P_{Test}(P'_{Train}P_{Train}+lambda*I)^{-1}P'_{Test})/diag(P_{Test}P'_{Test}))$$

Usage

CDMAX(Train, Test, P, lambda = 1e-05)

Arguments

Train
vector of identifiers for individuals in the training set
Test
vector of identifiers for individuals in the test set
P
$n \times k$ matrix of the first PCs of the predictor variables. The matrix needs to have union of the identifiers of the candidate and test individuals as rownames.
lambda
scalar shrinkage parameter ($\lambda>0$).

Value

  • value of the criterion.