Description Usage Arguments Value Examples
This function performs residual bootsrrap the Leave-One-Covariate-Out regularization path test staitsic and would return test p-value
1 2 3 |
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 |
B: |
integer, number of bootstraps |
parallel: |
boolean, run the whole bootstrap process in parallell, useful if run in a multicore cpu, especially in cluster |
exact: |
boolean, using ExactPath.TS or AprroxPath.TS |
beta.init: |
str, c("adaptive", "de-sparse", "MC+", "SCAD", "Truth"). Under developing, please use "adaptive" and "Truth". Needed if perform high-dimensional regression, low-dimensional regression will use LSE. |
beta.true: |
true value of beta, if your beta.init = "Truth", need to specify this |
...: |
args wull be passed to ExactPath.TS or ApproxPath.Ts |
a list of p-value, TS, TS_null, rej or nor
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
Path.Resample(X, Y, which.covariate = c(1, 2), betaNull = c(1, 2), multiTest = FALSE, B = 100)
# Test \eqn{H_0: \beta_1 = 1, \beta_1 = 2} simultaneously
Path.Resample(X, Y, which.covariate = list(c(1, 2)), betaNull = list(c(1, 2)), multiTest = TRUE, B = 100)
# Test \eqn{H_0: \beta_1 = 1, \beta_2 = 2} simultaneously and test \eqn{H_0: \beta_1 = 0, \beta_2 = 0}
Path.Resample(X, Y, which.covariate = list(c(1, 2), c(1, 2)), betaNull = list(c(1, 2), c(0, 0)), multiTest = TRUE, B = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.