lambdasearch {KRLS} | R Documentation |
Leave-one-out optimization to find \lambda
Description
Function conducts leave-one-out optimization to find \lambda
using a golden search search with caching. This function is called internally by krls
. It would normally not be called by the user directly.
Usage
lambdasearch(L=NULL,
U=NULL,
y=NULL,
Eigenobject=NULL,
tol=NULL,
noisy=FALSE,
eigtrunc=NULL)
Arguments
L |
Non-negative scalar that determines the lower bound of the search window. Default is |
U |
Positive scalar that determines the upper bound of the search window. Default is |
y |
N by 1 matrix of outcomes. |
Eigenobject |
List that contains the eigenvalues and eigenvectors of the kernel matrix K. |
tol |
Positive scalar that determines the tolerance used in the optimization routine used to find |
noisy |
If |
eigtrunc |
Positive scalar value that determines truncation of eigenvalues for lamnda search window. See |
Details
By default, upper bound is found as follows: Set j to n, decrease by one until the following is longer true: sum(EigenValues / (EigenValues + j)) < 1.
By default, upper bound is found as follows: Get the position, q, of the eigenvalue that is closest to max(Eigenvalue)/1000. Set j to 0, increase in steps of 0.05 until the below is longer true: sum(EigenValues / (EigenValues + j)) > q.
Value
A scalar that contains the \lambda
that minimizes the sum of squared leave-one-out errors.
Author(s)
Jens Hainmueller (Stanford) and Chad Hazlett (MIT)