From noreply at r-forge.r-project.org Sat Apr 20 14:03:08 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 20 Apr 2013 14:03:08 +0200 (CEST) Subject: [Gsdesign-commits] r346 - in pkg/gsDesign: . R Message-ID: <20130420120308.A2FE318504E@r-forge.r-project.org> Author: keaven Date: 2013-04-20 14:03:08 +0200 (Sat, 20 Apr 2013) New Revision: 346 Modified: pkg/gsDesign/DESCRIPTION pkg/gsDesign/R/gsBinomial.R Log: Added capability for nSurv, gsSurv, eEvents to accomodate 0 event rates and censoring rates in same period (enables studies with follow-up time cut off). Fixed to nBinomial for relative risk sample size null hypothesis under superiority. Modified: pkg/gsDesign/DESCRIPTION =================================================================== --- pkg/gsDesign/DESCRIPTION 2013-03-14 21:41:24 UTC (rev 345) +++ pkg/gsDesign/DESCRIPTION 2013-04-20 12:03:08 UTC (rev 346) @@ -1,5 +1,5 @@ Package: gsDesign -Version: 2.7-06 +Version: 2.8-00 Title: Group Sequential Design Author: Keaven Anderson Maintainer: Keaven Anderson Modified: pkg/gsDesign/R/gsBinomial.R =================================================================== --- pkg/gsDesign/R/gsBinomial.R 2013-03-14 21:41:24 UTC (rev 345) +++ pkg/gsDesign/R/gsBinomial.R 2013-04-20 12:03:08 UTC (rev 346) @@ -218,7 +218,7 @@ p10 <- (-b - sqrt(b ^ 2 - 4 * a * c)) / 2 / a p20 <- p10 / RR p10[d0] <- (p1[d0] + ratio[d0] * p2[d0]) / (1 + ratio[d0]) - p20[d0] <- p1[d0] + p20[d0] <- p10[d0] sigma0 <- sqrt((ratio + 1) * (p10 * (1 - p10) + RR ^ 2 * p20 * (1 - p20) / ratio)) sigma1 <- sqrt((ratio + 1) * From noreply at r-forge.r-project.org Mon Apr 22 03:15:55 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 22 Apr 2013 03:15:55 +0200 (CEST) Subject: [Gsdesign-commits] r347 - pkg/gsDesign/man Message-ID: <20130422011555.D99EF180933@r-forge.r-project.org> Author: keaven Date: 2013-04-22 03:15:54 +0200 (Mon, 22 Apr 2013) New Revision: 347 Modified: pkg/gsDesign/man/binomial.Rd Log: nBinomial documentation: corrected definition of sigma0, sigma1 (no calculations changed!) Modified: pkg/gsDesign/man/binomial.Rd =================================================================== --- pkg/gsDesign/man/binomial.Rd 2013-04-20 12:03:08 UTC (rev 346) +++ pkg/gsDesign/man/binomial.Rd 2013-04-22 01:15:54 UTC (rev 347) @@ -26,7 +26,7 @@ the confidence intervals are produced by inverting the testing procedures in \code{testBinomial()}. The Type I error \code{alpha} input to \code{ciBinomial} is always interpreted as 2-sided. -\code{simBinomial()} performs simulations to estimate the power for a Miettinin and Nurminen (1985) test +\code{simBinomial()} performs simulations to estimate the power for a Miettinen and Nurminen (1985) test comparing two binomial rates for superiority or non-inferiority. As noted in documentation for \code{bpower.sim()} in the HMisc package, by using \code{testBinomial()} you can see that the formulas without any continuity correction are quite accurate. In fact, Type I error for a continuity-corrected test is significantly lower (Gordon and Watson, 1996) than the nominal rate. @@ -68,7 +68,7 @@ \item{sided}{2 for 2-sided test, 1 for 1-sided test} \item{outtype}{\code{nBinomial} only; 1 (default) returns total sample size; 2 returns a data frame with sample size for each group (\code{n1, n2}; if \code{n} is not input as \code{NULL}, power is returned in \code{Power}; 3 returns a data frame with total sample size (\code{n}), sample size in each group (\code{n1, n2}), Type I error (\code{alpha}), 1 or 2 (\code{sided}, as input), Type II error (\code{beta}), power (\code{Power}), -null and alternate hypothesis variance (\code{sigma0, sigma1}), input event rates (\code{p1, p2}), null hypothesis difference in treatment group meands (\code{delta0}) and null hypothesis event rates (\code{p10, p20}). +null and alternate hypothesis standard deviations (\code{sigma0, sigma1}), input event rates (\code{p1, p2}), null hypothesis difference in treatment group meands (\code{delta0}) and null hypothesis event rates (\code{p10, p20}). } \item{n}{If power is to be computed in \code{nBinomial()}, input total trial sample size in \code{n}.} \item{x1}{Number of \dQuote{successes} in the control group} @@ -97,7 +97,7 @@ Gordon, I and Watson R (1985), The myth of continuity-corrected sample size formulae. \emph{Biometrics}; 52: 71-76. -Miettinin, O and Nurminen, M (1985), Comparative analysis of two rates. \emph{Statistics in Medicine}; 4 : 213-226. +Miettinen, O and Nurminen, M (1985), Comparative analysis of two rates. \emph{Statistics in Medicine}; 4 : 213-226. } \details{ @@ -135,8 +135,8 @@ \item{sided}{As input} \item{beta}{As input; if \code{n} is input, this is computed} \item{Power}{If \code{n=NULL} on input, this is \code{1-beta}; otherwise, the power is computed for each sample size input} -\item{sigma0}{A vector containing the variance of the treatment effect difference under the null hypothesis} - \item{sigma1}{A vector containing the variance of the treatment effect difference under the alternative hypothesis} +\item{sigma0}{A vector containing the standard deviation of the treatment effect difference under the null hypothesis} + \item{sigma1}{A vector containing the standard deviation of the treatment effect difference under the alternative hypothesis} \item{p1}{As input} \item{p2}{As input} \item{p10}{group 1 event rate used for null hypothesis}