pvalue.wire: The p-values for the weighted contrast W_j.

Description Usage Arguments Details Value See Also Examples

Description

This function caculates the p-value of the weighted contrast, W_j.

Usage

1
pvalue.wire(wj, wj0)

Arguments

wj

The weighted contrast W_j, output of scores.wire.

wj0

The null distribution for W_j, output of wj2.permuted.

Details

The p-values relate to the tests set by the contrast in scores.wire.

Value

A vector of p-values.

See Also

emmixwire scores.wire wj2.permuted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(hedenlc)
dat<-hedenlc[seq_len(100),] #for speed

set.seed(12345)
ret <-emmixwire(dat, g=3, ncov=3, nvcov=1, n1=7, n2=8, 
        debug=1, itmax=20, epsilon=1e-5)

###calculate the W_j
wj <- scores.wire(ret, contrast=c(1, -1))

### the null distribution of W_j
wj0 <- wj2.permuted(dat, ret, nB=19)
### the p-values of W_j
pv  <- pvalue.wire(wj, wj0)

andrewthomasjones/EMMIXcontrasts documentation built on June 26, 2019, 5:46 a.m.