TPC {TPCselect}R Documentation

Variable Selection via Thresholded Partial Correlation

Description

These are the main selection functions with fixed significance level s and constant. The function TPC implements the thresholded partial correlation (TPC) approach to selecting important variables in linear models of Li et al. (2017). The function TPC_pl implements the thresholded partial correlation approach to selecting important variables in partial linear models of Liu et al. (2018). This function also extends the PC-simple algorithm of Bühlmann et al. (2010) to partial linear models.

Usage

TPC(y, x, s = 0.05, constant = 1, method = "threshold")

TPCselect(y, x, s = 0.05, constant = 1, method = "threshold")

Arguments

y

response vector;

x

covariate matrix;

s

a numeric value that used as significance level(s) for partial correlation test.

constant

a value that used as the tuning constant for partial correlation test. constant is treated as 1 when method is "simple".

method

the method to be used; default set as method = "threshold"; "simple" is also available.

Value

TPC.object a TPC object, which extends the lm object. New attributes are:

Examples

#generate sample data
p = 200
n = 200
truebeta <- c(c(3,1.5,0,0,2),rep(0,p-5))
rho = 0.3
sigma =  matrix(0,p+1,p+1)
for(i in 1:(p+1)){
  for(j in 1:(p+1)){
    sigma[i,j] = rho^(abs(i-j))
  }
}
x_error = 0.9*MASS::mvrnorm(n,rep(0,p+1),sigma) + 0.1*MASS::mvrnorm(n,rep(0,p+1),9*sigma)
x = x_error[,1:p]
error = x_error[,p+1]
y = x%*%truebeta + error

#perform variable selection via partial correlation
TPC.fit = TPC(y,x,0.05,1,method="threshold")
TPC.fit$beta


[Package TPCselect version 0.8.3 Index]