estimate_ridge: Estimating a Single Model

Description Usage Arguments Details Value Author(s) References Examples

Description

Estimating projection matrices and parameter estimates for a single model.

Usage

1
2
estimate_ridge(Y, X, K, lambda, compute_kernel_terms = TRUE,
  converge_thres = 1e-04)

Arguments

Y

(vector of length n) Reponses of the dataframe.

X

(dataframe, n*p) Fixed effects variables in the dataframe (could contains several subfactors).

K

(list of matrices) A nested list of kernel term matrices, corresponding to each kernel term specified in the formula for a base kernel function in kern_func_list.

lambda

(numeric) A numeric string specifying the range of tuning parameter to be chosen. The lower limit of lambda must be above 0.

compute_kernel_terms

(logic) Whether to computing effect for each individual terms. If FALSE then only compute the overall effect.

converge_thres

(numeric) The convergence threshold for computing kernel terms.

Details

For a single model, we can calculate the output of gaussian process regression, the solution is given by

\hat{β}=[X^T(K+λ I)^{-1}X]^{-1}X^T(K+λ I)^{-1}y

\hat{α}=(K+λ I)^{-1}(y-\hat{β}X)

.

Value

lambda

(numeric) The selected tuning parameter based on the estimated ensemble kernel matrix.

beta

(matrix, p*1) Fixed effects estimator of the model.

alpha

(matrix, n*length(K)) Random effects estimator for each kernel term specified in the formula.

proj_matrix

(list of length 4) Estimated projection matrices of the model.

Author(s)

Wenying Deng

References

Andreas Buja, Trevor Hastie, and Robert Tibshirani. (1989) Linear Smoothers and Additive Models. Ann. Statist. Volume 17, Number 2, 453-510.

Examples

1
2
3
estimate_ridge(Y = CVEK:::model_matrices$y, 
X = CVEK:::model_matrices$X, K = CVEK:::K_ens, 
lambda = CVEK:::lambda_ens)

statmlhb/CVEK documentation built on May 5, 2019, 3:47 a.m.