print.prototest: Print 'prototest' object

Description Usage Arguments Details Author(s) See Also Examples

View source: R/print.prototest.R

Description

Generic print method for prototest objects

Usage

1
2
## S3 method for class 'prototest'
 print(x, ...)

Arguments

x

object of type prototest.

...

other parameters passed to print function.

Details

Prints the test statistic and p-value associated with the prototest object x.

Author(s)

Stephen Reid

See Also

prototest.univariate, prototest.multivariate

Examples

 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)

prototest documentation built on May 2, 2019, 4:02 p.m.