lmdme-padjust: 'p.adjust' of p-values for Multiple Test Comparison...

Description Usage Arguments Value Author(s) See Also Examples

Description

Given a set of p-values, returns adjusted p-values using one of several methods.

Usage

1
2
3
  ## S4 method for signature 'lmdme'
p.adjust(p, term=NULL,
  method=p.adjust.methods, drop=TRUE)

Arguments

p

numeric vector of p-values as in stats::p.adjust or lmdme class object.

method

correction method available in p.adjust.methods.

term

character with the corresponding term to return.

...

other arguments.

drop

should try to drop the list structure if length==1? Default value is TRUE

Value

according to the call, one of the following objects can be returned

numeric

vector of adjusted p-values.

matrix

for lmdme object If term!=NULL, the corresponding character is looked up within the list of p.values returning the associated matrix of G rows (individuals) x k columns (levels of the corresponding model term) with the adjusted p-values.

Author(s)

Cristobal Fresno and Elmer A Fernandez

See Also

p.adjust, p.adjust.methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
data(stemHypoxia)

##Just to make a balanced dataset in the Fisher sense (2 samples per
## time*oxygen levels)
design<-design[design$time %in% c(0.5, 1, 5) & design$oxygen %in% c(1,5,21),]
design$time<-as.factor(design$time)
design$oxygen<-as.factor(design$oxygen)
rownames(M)<-M[, 1]

##Keeping appropriate samples only
M<-M[, colnames(M) %in% design$samplename]

##ANOVA decomposition
fit<-lmdme(model=~time+oxygen+time:oxygen, data=M, design=design)

##Adjust p-values only on the interaction p.values using false discovery rate
## method
pInteraction<-p.values(fit, term="time:oxygen")
FDRInteraction<-p.adjust(fit, term="time:oxygen", method="fdr")
corrected<-sum(pInteraction < 0.05) - sum(FDRInteraction < 0.05)
}

Example output

Loading required package: pls

Attaching package: 'pls'

The following object is masked from 'package:stats':

    loadings

Loading required package: stemHypoxia

Attaching package: 'lmdme'

The following object is masked from 'package:stats':

    p.adjust

lmdme documentation built on Nov. 8, 2020, 7:46 p.m.