Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
allenzhuaz authored May 1, 2017
1 parent a04f529 commit 28b1cec
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 24 deletions.
21 changes: 14 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@ Suggests:
Author: Yalin Zhu, Wenge Guo
Maintainer: Yalin Zhu <[email protected]>
BugReports: https://github.com/allenzhuaz/FixSeqMTP/issues
Description: Several generalized/directional Fixed Sequence Multiple Testing Procedures (g-
FSMTPs/d-FSMTPs) are developed for testing a sequence of pre-ordered hypotheses while
controlling the FWER, FDR and Directional Error (mdFWER). All three FWER controlling g-FSMTPs are designed under arbitrary dependence, which allow any number of acceptances. Two FDR controlling g-FSMTPs are respectively designed under arbitrary dependence and independence, which allow more but a given number of acceptances. Two mdFWER controlling d-FSMTPs are respectively designed under arbitrary dependence and independence, which can also make directional decisions based on the signs of the test statistics. The main
functions for each proposed g-FSMTPs are designed to calculate adjusted p-values
and critical values, respectively. For users' convenience, the output results
also include the option of decision rules for convenience.
Description: Several generalized / directional Fixed Sequence Multiple Testing
Procedures (FSMTPs) are developed for testing a sequence of pre-ordered
hypotheses while controlling the FWER, FDR and Directional Error (mdFWER).
All three FWER controlling generalized FSMTPs are designed under arbitrary
dependence, which allow any number of acceptances. Two FDR controlling
generalized FSMTPs are respectively designed under arbitrary dependence and
independence, which allow more but a given number of acceptances. Two mdFWER
controlling directional FSMTPs are respectively designed under arbitrary
dependence and independence, which can also make directional decisions based
on the signs of the test statistics. The main functions for each proposed
generalized / directional FSMTPs are designed to calculate adjusted p-values
and critical values, respectively. For users' convenience, the functions also
provide the output option for printing decision rules.
License: GPL (>= 2)
Encoding: UTF-8
LazyData: TRUE
RoxygenNote: 5.0.1

21 changes: 21 additions & 0 deletions FixSeqMTP.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace
12 changes: 4 additions & 8 deletions R/FSmdFWER.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Critical values for Fixed Sequence mdFWER Controlling Procedure under Arbitrary Dependence
#' Critical values for Fixed Sequence mdFWER Controlling Procedure under Arbitrary Dependence Along with Directional Decisions Regarding Parameters of Interest
#'
#' Given a set of pre-ordered test statistics and the corresponding p-values, returns critical values using the directional fixed sequence multiple testing procedures under arbitrary dependence (See Procedure 1 and Theorem 1 in Grandhi et al. (2016)). The function also provides an option to make decisions and determine the sign given a pre-specified significant level \eqn{\alpha} and the test statistics.
#'
Expand All @@ -20,7 +20,6 @@
#' ## Clinical trial example in Grandhi et al. (2016)
#' Pval <- c(0.0008, 0.0135, 0.0197, 0.7237, 0.0003, 0.2779, 0.0054, 0.8473)
#' Zstat <- c(3.4434, 2.5085, 2.3642, -0.3543, 3.7651, 1.0900, 2.8340, 0.1930)
#' FSmdFWER.arbidept.cv(p = Pval, make.decision = FALSE)
#' FSmdFWER.arbidept.cv(p = Pval, test.stat = Zstat, make.decision = TRUE)
#' @export
FSmdFWER.arbidept.cv <- function(p, test.stat, alpha=0.05, make.decision = TRUE){
Expand All @@ -43,7 +42,7 @@ FSmdFWER.arbidept.cv <- function(p, test.stat, alpha=0.05, make.decision = TRUE)
}


#' Adjusted P-values for Fixed Sequence mdFWER Controlling Procedure under Arbitrary Dependence
#' Adjusted P-values for Fixed Sequence mdFWER Controlling Procedure under Arbitrary Dependence Along with Directional Decisions Regarding Parameters of Interest
#'
#' Given a set of pre-ordered test statistics and the corresponding p-values, returns adjusted p-values using the directional fixed sequence multiple testing procedures under arbitrary dependence (See Procedure 1 and Theorem 1 in Grandhi et al. (2016)). The function also provides an option to make decisions and determine the sign given a pre-specified significant level \eqn{\alpha} and the test statistics.
#'
Expand All @@ -65,7 +64,6 @@ FSmdFWER.arbidept.cv <- function(p, test.stat, alpha=0.05, make.decision = TRUE)
#' ## Clinical trial example in Grandhi et al. (2016)
#' Pval <- c(0.0008, 0.0135, 0.0197, 0.7237, 0.0003, 0.2779, 0.0054, 0.8473)
#' Zstat <- c(3.4434, 2.5085, 2.3642, -0.3543, 3.7651, 1.0900, 2.8340, 0.1930)
#' FSmdFWER.arbidept.p.adjust(p = Pval, make.decision = FALSE)
#' FSmdFWER.arbidept.p.adjust(p = Pval, test.stat = Zstat, make.decision = TRUE)
#' @export
FSmdFWER.arbidept.p.adjust <- function(p, test.stat, alpha=0.05, make.decision = TRUE){
Expand All @@ -82,7 +80,7 @@ FSmdFWER.arbidept.p.adjust <- function(p, test.stat, alpha=0.05, make.decision =



#' Critical values for Fixed Sequence mdFWER Controlling Procedure under Independence
#' Critical values for Fixed Sequence mdFWER Controlling Procedure under Independence Along with Directional Decisions Regarding Parameters of Interest
#'
#' Given a set of pre-ordered test statistics and the corresponding p-values, returns critical values using the directional fixed sequence multiple testing procedures under independence (See Procedure 2 and Theorem 2 in Grandhi et al. (2016)). The function also provides an option to make decisions and determine the sign given a pre-specified significant level \eqn{\alpha} and the test statistics.
#'
Expand All @@ -104,7 +102,6 @@ FSmdFWER.arbidept.p.adjust <- function(p, test.stat, alpha=0.05, make.decision =
#' ## Clinical trial example in Grandhi et al. (2016)
#' Pval <- c(0.0008, 0.0135, 0.0197, 0.7237, 0.0003, 0.2779, 0.0054, 0.8473)
#' Zstat <- c(3.4434, 2.5085, 2.3642, -0.3543, 3.7651, 1.0900, 2.8340, 0.1930)
#' FSmdFWER.indept.cv(p = Pval, make.decision = FALSE)
#' FSmdFWER.indept.cv(p = Pval, test.stat = Zstat, make.decision = TRUE)
#' @export
FSmdFWER.indept.cv <- function(p, test.stat, alpha=0.05, make.decision = TRUE){
Expand All @@ -126,7 +123,7 @@ FSmdFWER.indept.cv <- function(p, test.stat, alpha=0.05, make.decision = TRUE){
} else{return(cv)}
}

#' Adjusted P-values for Fixed Sequence mdFWER Controlling Procedure under Independence
#' Adjusted P-values for Fixed Sequence mdFWER Controlling Procedure under Independence Along with Directional Decisions Regarding Parameters of Interest
#'
#' Given a set of pre-ordered test statistics and the corresponding p-values, returns adjusted p-values using the directional fixed sequence multiple testing procedures under independence (See Procedure 2 and Theorem 2 in Grandhi et al. (2016)). The function also provides an option to make decisions and determine the sign given a pre-specified significant level \eqn{\alpha} and the test statistics.
#'
Expand All @@ -148,7 +145,6 @@ FSmdFWER.indept.cv <- function(p, test.stat, alpha=0.05, make.decision = TRUE){
#' ## Clinical trial example in Grandhi et al. (2015)
#' Pval <- c(0.0008, 0.0135, 0.0197, 0.7237, 0.0003, 0.2779, 0.0054, 0.8473)
#' Zstat <- c(3.4434, 2.5085, 2.3642, -0.3543, 3.7651, 1.0900, 2.8340, 0.1930)
#' FSmdFWER.indept.p.adjust(p = Pval, make.decision = FALSE)
#' FSmdFWER.indept.p.adjust(p = Pval, test.stat = Zstat, make.decision = TRUE)
#' @export
FSmdFWER.indept.p.adjust <- function(p, test.stat, alpha=0.05, make.decision = TRUE){
Expand Down
3 changes: 1 addition & 2 deletions man/FSmdFWER.arbidept.cv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/FSmdFWER.arbidept.p.adjust.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/FSmdFWER.indept.cv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/FSmdFWER.indept.p.adjust.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/FixSeqMTP.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/FixSeqMTP.pdf
Binary file not shown.

0 comments on commit 28b1cec

Please sign in to comment.