Description Usage Arguments Value Author(s) References Examples

This library collects some procedures controlling the Generalized Familywise Error Rate: Lehmannn and Romano (2005), Guo and Romano (2007) (single step and stepdown), Finos and Farcomeni (2009).

1 2 3 4 5 6 7 8 9 | ```
kfweLR(p, k = 1, alpha = 0.01, disp = TRUE)
kfweGR(p, k = 1, alpha = 0.01, disp = TRUE,
SD=TRUE, const = 10, alpha.prime = getAlpha(k = k, s = length(p),
alpha = alpha, const = const))
kfweOrd(p, k = 1, alpha = 0.01, ord = NULL,
alpha.prime = alpha, J = qnbinom(alpha,k,alpha.prime),
disp = TRUE, GD=FALSE)
getAlpha (s, k = 1, alpha = 0.01, const = 10)
``` |

`p` |
vector of p-values of length s |

`s` |
number of p-values (i.e. hypotheses) |

`k` |
number of allowed errors in kFWE controls |

`alpha` |
global significance level |

`ord` |
the vector of values based on which the p-values have to be ordered |

`const` |
Bigger is better (more precise but slower) |

`J` |
number of allowed jumps befor stopping |

`disp` |
diplay output? TRUE/FALSE |

`SD` |
Step-down version of the procedure? (TRUE/FALSE) the step-down version is uniformly more powerful than the single step one. |

`alpha.prime` |
univariate alpha for single step Guo and Romano procedure |

`GD` |
Logic value. Should the correction for general dependence be applied? (See reference below for further details) |

kfweOrd, kfweLR, kfweGR, kfweGR.SD return a vector of kFWE-adjusted p-values. It respect the order of input vector of p-values p.

getAlpha returns the alpha for Guo and Romano procedure.

L. Finos and A. Farcomeni

For Lehmann and Romano procedure see:

Lehmann and Romano (2005) Generalizations of the Familywise Error Rate, Annals of Statistics, 33, 1138-1154.

For Guo and Romano procedure see:

Guo and Romano (2007) A Generalized Sidak-Holm procedure and control of genralized error rates under independence, Statistical Applications in Genetics and Molecular Biology, 6, 3.

For Ordinal procedure see:

Finos and Farcomeni (2010) k-FWER control without multiplicity correction, with application to detection of genetic determinants of multiple sclerosis in Italian twins. Biometrics (Articles online in advance of print: DOI 10.1111/j.1541-0420.2010.01443.x)

1 2 3 4 5 6 7 8 9 10 | ```
set.seed(13)
y=matrix(rnorm(3000),3,1000)+2 #create toy data
p=apply(y,2,function(y) t.test(y)$p.value) #compute p-values
M2=apply(y^2,2,mean) #compute ordering criterion
kord=kfweOrd(p,k=5,ord=M2) #ordinal procedure
kgr=kfweGR(p,k=5) #Guo and Romano
kord=kfweOrd(p,k=5,ord=M2,GD=TRUE) #ordinal procedure (any dependence)
klr=kfweLR(p,k=5) #Lehaman and Romano (any dependence)
``` |

```
Ordered k-FWER procedure
1000 tests, k=5, alpha=0.01, individual alpha threshold=0.01
125 jumps allowed
32 rejections
Guo and Romano k-FWER Step Down procedure
1000 tests, k=5, alpha=0.01
0.0013057 individual alpha threshold
23 rejections
Ordered k-FWER procedure
1000 tests, k=5, alpha=0.01, individual alpha threshold=0.0003846
125 jumps allowed
0 rejections
Lehmann e Romano k-FWER Step Down procedure
1000 tests, k=5, alpha=0.01
1 rejections
```

someKfwer documentation built on May 29, 2017, 1:39 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.