[Gsdesign-commits] r349 - pkg/gsDesign/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat May 18 12:05:57 CEST 2013


Author: keaven
Date: 2013-05-18 12:05:57 +0200 (Sat, 18 May 2013)
New Revision: 349

Modified:
   pkg/gsDesign/R/gsqplot.R
Log:
Updated gsHR to take null hypothesis hazard ratio into account. This should fix HR's in plots for non-inferiority designs.

Modified: pkg/gsDesign/R/gsqplot.R
===================================================================
--- pkg/gsDesign/R/gsqplot.R	2013-05-17 20:42:08 UTC (rev 348)
+++ pkg/gsDesign/R/gsqplot.R	2013-05-18 10:05:57 UTC (rev 349)
@@ -115,6 +115,7 @@
 gsHR <- function(z, i, x, ratio=1, ylab="Estimated hazard ratio", ...)
 {    c <- 1 / (1 + ratio)
      psi <- c * (1 - c)
+     if (is.null(x$hr0)) x$hr0 <- 1
      hrHat <- exp(-z / sqrt(x$n.I[i] * psi)) * x$hr0
      hrHat
 }



More information about the Gsdesign-commits mailing list