screenVCM: Perform screening for ultrahigh-dimensional varying...

View source: R/screenVCM.R

screenVCMR Documentation

Perform screening for ultrahigh-dimensional varying coefficient model

Description

Implements a screening procedure proposed by Liu, Li and Wu(2014) for varying coefficient models with ultra-high dimensional predictors.

The function code is adapted from the relevant authors' code. Special thanks are due to Jingyuan Liu for providing some of the code upon which this function is based.

Usage

screenVCM(X, Y, U)

Arguments

X

Matrix of predictors to be screened. There should be one row for each observation.

Y

Vector of responses. It should have the same length as the number of rows of X.

U

Covariate, with which coefficient functions vary.

Value

A list with following components: CORR_sq A vector of the unconditioned squared correlation with length equal to the number of columns in the input matrix X. The hgh the unconditioned squared correlation is, the more desirable it is to retain the corresponding X covariate in a later predictive model. rank Vector for the rank of the predictors in terms of the conditional correlation ( \hat{rho}*_j in the paper). This will have length equal to the number of columns in the input matrix X, and will consist of a permutation of the integers 1 through that length. A rank of 1 indicates the feature which appears to have the best marginal predictive performance with largest \hat{rho}*_j, 2 represents the second best and so forth.

References

Liu, J., Li, R., & Wu, R. (2014). Feature selection for varying coefficient models with ultrahigh-dimensional covariates. Journal of the American Statistical Association, 109: 266-274. <DOI:10.1080/01621459.2013.850086>

Examples

set.seed(12345678)
results <- simulateVCM(p=400,
                       trueIdx = c(2, 100, 300),
                       betaFun = function(U) {
                         beta2 <- 2*I(U>0.4)
                         beta100 <- 1+U
                         beta300 <- (2-3*U)^2
                         return(c(beta2,
                                  beta100,
                                  beta300))
                         })
screenResults<- screenVCM(X = results$X,
                          Y = results$Y,
                          U = results$U)
rank <- screenResults$rank
unlist(rank)
trueIdx <- c(2,100,400, 600, 1000)
rank[trueIdx]

VariableScreening documentation built on June 24, 2022, 1:06 a.m.