KPR: Kernel Penalized Regression

View source: R/KPR.R

KPRR Documentation

Kernel Penalized Regression

Description

Fits a kernel penalized regression model using a design matrix X, response vector Y, sample similarity kernels H_1, H_2, ..., H_h, and variable similarity kernels Q_1, ..., Q_q.

Usage

KPR(
  X,
  E = NULL,
  Y,
  H = diag(nrow(X)),
  Q = diag(ncol(X)),
  scale = FALSE,
  REML = FALSE,
  Q.inv = TRUE,
  control.outer = list(trace = FALSE, NMinit = TRUE, method = "BFGS"),
  control.optim = list()
)

Arguments

X

An n x p data matrix, consisting of variables that should be penalized by the Q matrices. Should be scaled and centered.

E

An n x r data matrix, consisting of variables that should not be penalized. Should be scaled and centered.

Y

An n x 1 response vector. Should be scaled and centered.

H

A list of n x n sample similarity kernels. If only one matrix is included in the model, it does not need to be wrapped as a list. All matrices must be symmetric positive semidefinite. This defaults to a single identity matrix.

Q

A list of p x p variable similarity kernels. If only one matrix is included in the model, it does not need to be wrapped as a list. All matrices must be symmetric positive semidefinite. This defaults to a single identity matrix.

scale

Logical, indicates whether to scale all the Q's, H's and the design matrix to have a spectral norm of 1.

REML

Logical, indicates whether to use REML estimation for finding the parameters. This will only work with a single H and Q matrix, and is the preferred method in this case.

Q.inv

Logical, indicates whether to penalize Q_composite or Q_composite inverse.

control.outer

A list of parameters used by the outer loop in 'constrOptim.nl'. This is only used when 'REML = FALSE'.

control.optim

A list of parameters used by the inner loop in 'constrOptim.nl'.

Value

beta.hat

Estimated coefficients for the penalized variables.

eta.hat

Estimated coefficients for the unpenalized variables.

lambda

The optimal lambda parameter estimated with maximum likelihood.

alpha

The vector of optimal weights corresponding to the Q matrices.

sigma

The vector of optimal weights corresponding to the H matrices.

References

Randolph et al. (2018) The Annals of Applied Statistics (Project Euclid)


pknight24/KPR documentation built on Aug. 5, 2023, 7:01 a.m.