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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri May 17 22:42:08 CEST 2013


Author: keaven
Date: 2013-05-17 22:42:08 +0200 (Fri, 17 May 2013)
New Revision: 348

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-04-22 01:15:54 UTC (rev 347)
+++ pkg/gsDesign/R/gsqplot.R	2013-05-17 20:42:08 UTC (rev 348)
@@ -115,7 +115,7 @@
 gsHR <- function(z, i, x, ratio=1, ylab="Estimated hazard ratio", ...)
 {    c <- 1 / (1 + ratio)
      psi <- c * (1 - c)
-     hrHat <- exp(-z / sqrt(x$n.I[i] * psi))
+     hrHat <- exp(-z / sqrt(x$n.I[i] * psi)) * x$hr0
      hrHat
 }
 gsCPz <- function(z, i, x, theta=NULL, ylab=NULL, ...)
@@ -414,7 +414,7 @@
 	{
 		stop("Spending function plot not available for boundary families")
 	}
-	if (x$upper$parname == "Points"){x$sfupar <- sfLinear} 
+#	if (x$upper$parname == "Points"){x$sfupar <- sfLinear} 
 
 	t <- 0:40 / 40 * xmax
             



More information about the Gsdesign-commits mailing list