[Gsdesign-commits] r236 - in pkg: gsDesign gsDesign/R gsDesign/man gsDesignGUIReview/osx
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Dec 22 00:17:57 CET 2009
Author: keaven
Date: 2009-12-22 00:17:57 +0100 (Tue, 22 Dec 2009)
New Revision: 236
Added:
pkg/gsDesignGUIReview/osx/gsDesign_2.2-1.tar.gz
pkg/gsDesignGUIReview/osx/gsDesign_2.2-1.zip
Modified:
pkg/gsDesign/DESCRIPTION
pkg/gsDesign/R/gsqplot.R
pkg/gsDesign/man/plot.gsDesign.Rd
Log:
Updated plotting controls for base graphics; move to v 2.2-1
Modified: pkg/gsDesign/DESCRIPTION
===================================================================
--- pkg/gsDesign/DESCRIPTION 2009-12-21 21:31:34 UTC (rev 235)
+++ pkg/gsDesign/DESCRIPTION 2009-12-21 23:17:57 UTC (rev 236)
@@ -1,5 +1,5 @@
Package: gsDesign
-Version: 2.2-0
+Version: 2.2-1
Title: Group Sequential Design
Author: Keaven Anderson
Maintainer: Keaven Anderson <keaven_anderson at merck.com>
Modified: pkg/gsDesign/R/gsqplot.R
===================================================================
--- pkg/gsDesign/R/gsqplot.R 2009-12-21 21:31:34 UTC (rev 235)
+++ pkg/gsDesign/R/gsqplot.R 2009-12-21 23:17:57 UTC (rev 236)
@@ -53,11 +53,11 @@
plots <- list(plotgsZ=c("1","z"),
plotgsPower=c("2","power"),
plotreleffect=c("3","xbar","thetahat","theta"),
- plotgsCP=c("4","copp"),
+ plotgsCP=c("4", "cp", "copp"),
plotsf=c("5","sf"),
plotASN=c("6","asn", "e{n}","n"),
plotBval=c("7","b","b-val","b-value"),
- plotHR=c("8","hr","hazard"))
+ plotHR=c("8","hr","hazard"))
# perform partial matching on plot type and return name
plottype <- match.arg(tolower(as.character(plottype)), as.vector(unlist(plots)))
@@ -65,15 +65,15 @@
}
"plotgsZ" <- function(x, ylab="Normal critical value",...){qplotit(x,ylab=ylab,fn=function(z,...){z},...)}
"plotBval" <- function(x, ylab="B-value",...){qplotit(x, fn=gsBvalue, ylab=ylab,...)}
-"plotreleffect" <- function(x, ylab=expression(hat(theta)/theta[1]), delta=1, delta0=0,...){qplotit(x, fn=gsDeltaHat, ylab=ylab, delta=delta, delta0=delta0,...)}
+"plotreleffect" <- function(x, ylab=NULL, delta=1, delta0=0,...){qplotit(x, fn=gsDeltaHat, ylab=ifelse(ylab!=NULL, ylab, expression(hat(theta)/theta[1])), delta=delta, delta0=delta0,...)}
"plotHR" <- function(x, ylab="Estimated hazard ratio",...){qplotit(x, fn=gsHRHat, ylab=ylab,...)}
-gsBvalue <- function(z,i,x,...)
+gsBvalue <- function(z,i,x,ylab="B-value",...)
{ Bval <- z * sqrt(x$timing[i])
Bval
}
-gsThetaHat <- function(z, i, x,...)
+gsThetaHat <- function(z, i, x, ylab=NULL,...)
{ thetaHat <- z / sqrt(x$n.I[i])/x$delta
- thetaHat
+ thetaHat
}
gsDeltaHat <- function(z, i, x, delta, delta0=0,...)
{ deltaHat <- z / sqrt(x$n.I[i]) * delta / x$delta - delta0
@@ -95,7 +95,10 @@
"qplotit" <- function(x, xlim=NULL, ylim=NULL, geom=c("line", "text"), zround=2, lty=c(1,1), col=c(1,1),
lwd=c(1,1), nlabel="TRUE", xlab="", ylab="", fn=function(z,i,x,...){z},
ratio=1, delta0=0, delta=.05, cex=1, base=FALSE,...)
-{ if(x$n.I[x$k] < 3)
+{ lty <- lty * c(1,1)
+ col <- col * c(1,1)
+ lwd <- lwd * c(1,1)
+ if(x$n.I[x$k] < 3)
{ nround <- 3
ntx <- "r="
if (xlab=="") xlab <- "Information relative to fixed sample design"
@@ -159,14 +162,17 @@
}
"plotgsCP" <- function(x, theta="thetahat", main="Conditional power at interim stopping boundaries",
- ylab=ifelse(theta == "thetahat",
+ ylab=NULL, geom="line",
+ xlab=ifelse(x$n.I[x$k] < 3, "Sample size relative to fixed design", "N"), xlim=NULL,
+ lty=1, col=1, pch=22, textcex=1, legtext=gsLegendText(test.type), zround=3, nlabel=TRUE,
+ base=FALSE, ...)
+{
+ if (is.null(ylab))
+ { ylab <- ifelse(theta == "thetahat",
expression(paste("Conditional power at",
theta, "=", hat(theta),sep=" ")),
- expression(paste("Conditional power at", theta, "=", delta))),
- geom="line",
- xlab=ifelse(x$n.I[x$k] < 3, "Sample size relative to fixed design", "N"), xlim=NULL,
- lty=1, col=1, pch=22, textcex=1, legtext=gsLegendText(test.type), zround=3, nlabel=TRUE, base=FALSE,...)
-{
+ expression(paste("Conditional power at", theta, "=", delta)))
+ }
if (!is.numeric(xlim))
{ xlim <- range(x$n.I[1:(x$k-1)])
xlim <- xlim + c(-.05,.05) * (xlim[2] - xlim[1])
@@ -242,7 +248,7 @@
Bound=array("Ntxt", x$k-1),
Ztxt=as.character(round(x$n.I[1:(x$k-1)],nround)))
if (base)
- { text(x=y2$N, y=y$CP, y2$Ztxt, cex=textcex)
+ { text(x=x$n.I[1:(x$k-1)], y=array(ymin/2, x$k-1), as.character(round(x$n.I[1:(x$k-1)],nround)), cex=textcex)
}
if (max(x$n.I) < 3)
{ if (base)
@@ -265,13 +271,18 @@
}
"plotsf" <- function(x,
xlab="Proportion of total sample size",
- ylab=expression(paste(alpha, "-spending")),
- ylab2=expression(paste(beta, "-spending")), oma=c(2, 2, 2, 2),
+ ylab=NULL,
+ ylab2=NULL, oma=c(2, 2, 2, 2),
legtext=if (x$test.type > 4) c("Upper bound", "Lower bound") else c(expression(paste(alpha, "-spending")),
expression(paste(beta, "-spending"))),
col=c(1,1), lwd=c(.5,.5), lty=c(1,2),
mai=c(.85, .75, .5, .5), xmax=1, base=FALSE,...)
-{
+{ ylab <- expression(paste(alpha, "-spending"))
+ ylab2 <- expression(paste(beta, "-spending"))
+ lty <- c(1,1) * lty
+ col <- c(1,1) * col
+ lwd <- c(1,1) * lwd
+
# K. Wills (GSD-31)
if (is(x, "gsProbability"))
{
Modified: pkg/gsDesign/man/plot.gsDesign.Rd
===================================================================
--- pkg/gsDesign/man/plot.gsDesign.Rd 2009-12-21 21:31:34 UTC (rev 235)
+++ pkg/gsDesign/man/plot.gsDesign.Rd 2009-12-21 23:17:57 UTC (rev 236)
@@ -88,7 +88,7 @@
Average sample number/expected sample size is computed using \code{n.I} at each analysis times the probability of crossing a boundary at that analysis.
If no boundary is crossed at any analysis, this is counted as stopping at the final analysis.
-B-values are Z-values multiplied by \code{sqrt(t)=sqrt(x$n.I/n$n.I[x$k])}.
+B-values are Z-values multiplied by \code{sqrt(t)=sqrt(x$n.I/x$n.I[x$k])}.
Thus, the expected value of a B-value at an analysis is the true value of
\eqn{theta} multiplied by the proportion of total planned observations at that time.
See Proschan, Lan and Wittes (2006).
Added: pkg/gsDesignGUIReview/osx/gsDesign_2.2-1.tar.gz
===================================================================
(Binary files differ)
Property changes on: pkg/gsDesignGUIReview/osx/gsDesign_2.2-1.tar.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: pkg/gsDesignGUIReview/osx/gsDesign_2.2-1.zip
===================================================================
(Binary files differ)
Property changes on: pkg/gsDesignGUIReview/osx/gsDesign_2.2-1.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
More information about the Gsdesign-commits
mailing list