Description Usage Arguments Value References See Also Examples
View source: R/RPtest_single.R
Compute pvalues 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 pvalues for each variable.
Shah, R. D., Buhlmann, P. (2016) Goodness of fit tests for highdimensional linear models http://arxiv.org/abs/1511.03334
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.