Description Usage Arguments Details Author(s) See Also Examples
View source: R/print.prototest.R
Generic print
method for prototest
objects
1 2 |
x |
object of type |
... |
other parameters passed to |
Prints the test statistic and p-value associated with the prototest
object x
.
Stephen Reid
prototest.univariate
, prototest.multivariate
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | require (prototest)
### generate data
set.seed (12345)
n = 100
p = 80
X = matrix (rnorm(n*p, 0, 1), ncol=p)
beta = rep(0, p)
beta[1:3] = 2 # three signal variables: number 1, 2, 3
signal = apply(X, 1, function(col){sum(beta*col)})
intercept = 3
y = intercept + signal + rnorm (n, 0, 1)
### treat all columns as if in same group and test for signal
# non-selective ELR test with nuisance intercept
elr = prototest.univariate (X, y, "ELR", selected.col=1:5)
print (elr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.