[Gsdesign-commits] r354 - pkg/gsDesign/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jun 5 22:14:06 CEST 2013


Author: keaven
Date: 2013-06-05 22:14:06 +0200 (Wed, 05 Jun 2013)
New Revision: 354

Modified:
   pkg/gsDesign/man/nSurv.Rd
   pkg/gsDesign/man/nSurvival.Rd
   pkg/gsDesign/man/ssrCP.Rd
Log:
Formatting changes in 3 help files (no content change).

Modified: pkg/gsDesign/man/nSurv.Rd
===================================================================
--- pkg/gsDesign/man/nSurv.Rd	2013-06-01 14:19:11 UTC (rev 353)
+++ pkg/gsDesign/man/nSurv.Rd	2013-06-05 20:14:06 UTC (rev 354)
@@ -222,10 +222,12 @@
 nSurv(lambdaC=log(2)/6, hr=.5, eta=log(2)/40, gamma=6, R=25)
 
 # piecewise constant enrollment rates (vary accrual duration)
-nSurv(lambdaC=log(2)/6, hr=.5, eta=log(2)/40, gamma=c(1,3,6), R=c(3,6,9), minfup=12)
+nSurv(lambdaC=log(2)/6, hr=.5, eta=log(2)/40, gamma=c(1,3,6), 
+      R=c(3,6,9), minfup=12)
 
 # stratified population (vary accrual duration)
-nSurv(lambdaC=matrix(log(2)/c(6,12),ncol=2), hr=.5, eta=log(2)/40, gamma=matrix(c(2,4),ncol=2), minfup=12)
+nSurv(lambdaC=matrix(log(2)/c(6,12),ncol=2), hr=.5, eta=log(2)/40, 
+      gamma=matrix(c(2,4),ncol=2), minfup=12)
 
 # piecewise exponential failure rates (vary accrual duration)
 nSurv(lambdaC=log(2)/c(6,12), hr=.5, eta=log(2)/40, S=3, gamma=6, minfup = 12)
@@ -236,9 +238,11 @@
       gamma=matrix(c(3,6,5,7),ncol=2), R=c(5,10), minfup = 12)
 
 # group sequential design (vary accrual rate to obtain power)
-x<-gsSurv(k=4,sfl=sfPower,sflpar=.5,lambdaC=log(2)/6, hr=.5, eta=log(2)/40,gamma=1, T=36,  minfup = 12)
+x<-gsSurv(k=4,sfl=sfPower,sflpar=.5,lambdaC=log(2)/6, hr=.5, 
+          eta=log(2)/40,gamma=1, T=36,  minfup = 12)
 x
-print(xtable(x,footnote="This is a footnote; note that it can be wide.", caption="Caption example."))
+print(xtable(x,footnote="This is a footnote; note that it can be wide.", 
+              caption="Caption example."))
 # find expected number of events at time 12 in the above trial
 nEventsIA(x=x,tIA=10)
 

Modified: pkg/gsDesign/man/nSurvival.Rd
===================================================================
--- pkg/gsDesign/man/nSurvival.Rd	2013-06-01 14:19:11 UTC (rev 353)
+++ pkg/gsDesign/man/nSurvival.Rd	2013-06-05 20:14:06 UTC (rev 354)
@@ -17,7 +17,8 @@
       alpha = 0.025, beta = 0.10, sided = 1, approx = FALSE,
       type = c("rr", "rd"), entry = c("unif", "expo"), gamma = NA)
 \method{print}{nSurvival}(x,...)
-nEvents(hr = .6, alpha = .025, beta = .1, ratio = 1, sided = 1, hr0 =  1, n = 0, tbl = FALSE)
+nEvents(hr = .6, alpha = .025, beta = .1, ratio = 1, sided = 1, 
+        hr0 =  1, n = 0, tbl = FALSE)
 hrn2z(hr, n, ratio=1, hr0=1, hr1=.7)
 hrz2n(hr, z, ratio=1, hr0=1)
 zn2hr(z, n, ratio=1, hr0=1, hr1=.7)
@@ -98,7 +99,7 @@
   \item{Ts}{As input.}
   \item{Tr}{As input.}
 
-  \code{nEvents} produces a scalar or vector of sample sizes (or powers) when \code{tbl=FALSE} or, when \code{tbl=TRUE} a matrix of values with the following columns:
+  \code{nEvents} produces a scalar or vector of sample sizes (or powers) when \code{tbl=FALSE} or, when \code{tbl=TRUE} a data frame of values with the following columns:
   \item{hr}{As input.}
   \item{n}{If \code{n[1]=0} on input (default), output contains the number of events need to obtain the input Type I and II error. If \code{n[1]>0} on input, the input value is returned.}
   \item{alpha}{As input.}

Modified: pkg/gsDesign/man/ssrCP.Rd
===================================================================
--- pkg/gsDesign/man/ssrCP.Rd	2013-06-01 14:19:11 UTC (rev 353)
+++ pkg/gsDesign/man/ssrCP.Rd	2013-06-05 20:14:06 UTC (rev 354)
@@ -7,7 +7,9 @@
 If not done carefully, these designs can be very inefficient. It is probably a good idea to compare any design to a simpler group sequential design; see, for example, Jennison and Turnbull, Statistics in Medicine, 2003.
 Method assumes a small Type I error is included with the interim analysis and that the design is an adaptation from a 2-stage group sequential design (Lehmacher and Wassmer, Biometrics, 1999).}
 \usage{
-ssrCP(z, theta = NULL, maxinc = 2, overrun = 0, beta = 0.1, cpadj = c(0.5, 1 - beta), x = gsDesign(k = 2, timing = 0.5, beta = beta))
+ssrCP(z, theta = NULL, maxinc = 2, overrun = 0, beta = 0.1, 
+      cpadj = c(0.5, 1 - beta), 
+      x = gsDesign(k = 2, timing = 0.5, beta = beta))
 }
 \arguments{
   \item{z}{Scalar or vector with interim standardized Z-value(s). Input of multiple values makes it easy to plot the revised sample size as a function of the interim test statistic.}
@@ -65,10 +67,12 @@
 
 # generate a 2-stage group sequential design with 
 # desired planned sample size (first 2 lines set planned sample size to that from above; normally)
-x<-gsDesign(k=2,n.fix=n.fix,timing=timing,sfu=sfu,sfupar=sfupar,alpha=alpha,beta=beta)
+x<-gsDesign(k=2,n.fix=n.fix,timing=timing,sfu=sfu,sfupar=sfupar,
+            alpha=alpha,beta=beta)
 nalt <- maxinflation*(x$n.I[2])
 par(mar=c(7, 4, 4, 4)+.1)
-plot(z,ssrCP(x=x,z=z,overrun=overrun,beta=betastar,cpadj=cpadj),type="l",xlim=c(0,3.5),axes=FALSE,xlab="",ylab="")
+plot(z,ssrCP(x=x,z=z,overrun=overrun,beta=betastar,cpadj=cpadj),
+     type="l",xlim=c(0,3.5),axes=FALSE,xlab="",ylab="")
 lines(z,80+240*dnorm(z,mean=0),col=2)
 lines(z,80+240*dnorm(z,mean=sqrt(x$n.I[1])*x$theta[2]),col=3)
 lines(z,80+240*dnorm(z,mean=sqrt(x$n.I[1])*x$theta[2]/2),col=4)
@@ -80,7 +84,8 @@
 lines(x=c(-3.5,3.5),y=c(nalt,nalt),lty=2)
 w <- x$timing[1]
 theta <- seq(.5,3.5,.5) / sqrt(x$n.I[1])
-CP <- pnorm(theta*sqrt(x$n.I[2]*(1-w))-(x$upper$bound[2]-seq(.5,3.5,.5)*sqrt(w))/sqrt(1-w))
+CP <- pnorm(theta*sqrt(x$n.I[2]*(1-w))-(x$upper$bound[2]-
+        seq(.5,3.5,.5)*sqrt(w))/sqrt(1-w))
 axis(side=1,line=3,at=seq(.5,3.5,.5),labels=as.character(round(CP,2)))
 mtext(side=1,"CP",line=3.5,at=.25)
 axis(side=1,line=1,at=seq(0,3.5,.5),labels=as.character(seq(0,3.5,.5)))



More information about the Gsdesign-commits mailing list