Description Usage Arguments Value Examples
This function performs the exact Leave-One-Covariate-Out regularization path estimator
1 2 3 | ExactPath.TS(X, Y, which.covariate, betaNull, multiTest,
path.method = "lars", norm = "L2.squared", normalize = TRUE,
intercept = FALSE)
|
X: |
a n by p matrix, design matrix |
Y: |
a n by 1 matrx, response |
which.covariate: |
a vector or a list of vector, specify which covaritate β_j to perform our test |
betaNull: |
a vector or a list of vector, should be the same shape as which.covariate. Specify the Null hypothesis, H_0: β_j = betaNull vs H_1 \neq betaNull if using multiTest = FALSE, then will return |
multiTest: |
boolean, TRUE: test simultaneously, FALSE: test individually |
path.method: |
string, c("lars", "plus.lasso", "plus.mc+", "plus.scad" ) |
norm: |
string, c("L1", "L2", "L2.squared", "L_inf") |
normalize: |
boolean, using normalization or not |
intercept: |
boolean, include intercept or not |
a vector of test statistic for each test specified
1 2 3 4 5 6 7 8 9 | X = matrix(rnorm(100*12), 100, 12)
beta = c(1,2, rep(0, 10))
Y = X %*% beta + rnorm(100)
# Test \eqn{H_0: \beta_1 = 1} and \eqn{H_0: \beta_1 = 2} individually
ExactPath.TS(X, Y, which.covariate = c(1, 2), betaNull = c(1, 2), multiTest = FALSE)
# Test \eqn{H_0: \beta_1 = 1, \beta_1 = 2} simultaneously
ExactPath.TS(X, Y, which.covariate = list(c(1, 2)), betaNull = list(c(1, 2)), multiTest = TRUE)
# Test \eqn{H_0: \beta_1 = 1, \beta_2 = 2} simultaneously and test \eqn{H_0: \beta_1 = 0, \beta_2 = 0}
ExactPath.TS(X, Y, which.covariate = list(c(1, 2), c(1, 2)), betaNull = list(c(1, 2), c(0, 0)), multiTest = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.