Description Usage Arguments Value References See Also Examples
View source: R/RPtest_single.R
Compute p-values for the significance of each variable in x
.
1 | RPtest_single(x, y, x_alt, B = 100L, rand_gen = rnorm, mc.cores = 1L)
|
x |
Input matrix with |
y |
Response variable; shoud be a numeric vector. |
x_alt |
Optional: a matrix with jth column the sparse projection of the
jth column of x on all its other columns i.e. the output of
|
B |
Number of bootstrap samples. If set to 0, the asymptotic ditribution is used for calibration. |
rand_gen |
A function to generate the simulated errors up to an unknown
scale factor. It must permit calling as |
mc.cores |
Number of cores to use. |
A vector of p-values for each variable.
Shah, R. D., Buhlmann, P. (2017) Goodness of fit tests for high-dimensional linear models https://rss.onlinelibrary.wiley.com/doi/10.1111/rssb.12234
RPtest
and sparse_proj
1 2 3 4 | x <- scale(matrix(rnorm(50*100), 50, 100))
x <- scale(x)
y <- as.numeric(x[, 1:5] %*% rep(1, 5) + rnorm(nrow(x)))
out <- RPtest_single(x=x, y=y, B=25)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.