| RPtest_single {RPtests} | R Documentation | 
Test significance of single predictors
Description
Compute p-values for the significance of each variable in x.
Usage
RPtest_single(x, y, x_alt, B = 100L, rand_gen = rnorm, mc.cores = 1L)
Arguments
| 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. | 
Value
A vector of p-values for each variable.
References
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
See Also
RPtest and sparse_proj
Examples
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)