[Gsdesign-commits] r370 - pkg/gsDesign/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu May 29 21:50:08 CEST 2014
Author: keaven
Date: 2014-05-29 21:50:07 +0200 (Thu, 29 May 2014)
New Revision: 370
Modified:
pkg/gsDesign/man/gsbound.Rd
pkg/gsDesign/man/nNormal.Rd
Log:
Documentation fix
Modified: pkg/gsDesign/man/gsbound.Rd
===================================================================
--- pkg/gsDesign/man/gsbound.Rd 2014-05-26 01:52:07 UTC (rev 369)
+++ pkg/gsDesign/man/gsbound.Rd 2014-05-29 19:50:07 UTC (rev 370)
@@ -2,7 +2,7 @@
\alias{gsBound}
\alias{gsBound1}
-\title{2.6: Boundary derivation - low level}
+\title{2.7: Boundary derivation - low level}
\description{\code{gsBound()} and \code{gsBound1()} are lower-level functions used to find boundaries for a group sequential design.
They are not recommended (especially \code{gsBound1()}) for casual users.
These functions do not adjust sample size as \code{gsDesign()} does to ensure appropriate power for a design.
Modified: pkg/gsDesign/man/nNormal.Rd
===================================================================
--- pkg/gsDesign/man/nNormal.Rd 2014-05-26 01:52:07 UTC (rev 369)
+++ pkg/gsDesign/man/nNormal.Rd 2014-05-29 19:50:07 UTC (rev 370)
@@ -6,25 +6,43 @@
Note that you may wish to investigate other R packages such as the \code{pwr} package which uses the t-distr
}
\usage{
-nNormal(delta1=1,sigma=1.7,sigalt=NULL,alpha=.025,beta=.1,ratio=1, sided=1,
-n=NULL,delta0=0)
+nNormal(delta1=1,sd=1.7,sd2=NULL,alpha=.025,beta=.1,ratio=1, sided=1,
+n=NULL,delta0=0,outtype=1)
}
\arguments{
\item{delta1}{difference between sample means under the alternate hypothesis.}
\item{delta0}{difference between sample means under the null hypothesis; normally this will be left as the default of 0.}
\item{ratio}{randomization ratio of experimental group compared to control.}
\item{sided}{1 for 1-sided test (default), 2 for 2-sided test.}
-\item{sigma}{Standard deviation for the control arm.}
-\item{sigalt}{Standard deviation of experimental arm; this will be set to be the same as the control arm with the default of \code{NULL}.}
+\item{sd}{Standard deviation for the control arm.}
+\item{sd2}{Standard deviation of experimental arm; this will be set to be the same as the control arm with the default of \code{NULL}.}
\item{alpha}{type I error rate. Default is 0.025 since 1-sided testing is default.}
\item{beta}{type II error rate. Default is 0.10 (90\% power). Not needed if \code{n} is provided.}
\item{n}{Sample size; may be input to compute power rather than sample size. If \code{NULL} (default) then sample size is computed.}
+\code{delta0}{default value of 0 is set to test for superiority; negative values used for non-inferiority (assuming \code{delta1>0}).}
+\item{outtype}{controls output; see value section below.}
}
\details{
\code{nNormal()} computes sample size for comparing two normal means when the variance for observations in
}
\value{
-If \code{n} is \code{NULL} (default), total sample size (2 arms combined) is computed. Otherwise, power is c
+If \code{n} is \code{NULL} (default), total sample size (2 arms combined) is computed. Otherwise, power is computed.
+If \code{outtype=1} (default), the computed value (sample size or power) is returned in a scalar or vector.
+If \code{outtype=2}, a data frame with sample sizes for each arm (\code{n1}, \code{n2})is returned; if \code{n} is not input as \code{NULL}, a third variable, \code{Power}, is added to the output data frame.
+If \code{outtype=3}, a data frame with is returned with the following columns:
+ \item{n}{A vector with total samples size required for each event rate comparison specified}
+ \item{n1}{A vector of sample sizes for group 1 for each event rate comparison specified}
+ \item{n2}{A vector of sample sizes for group 2 for each event rate comparison specified}
+ \item{alpha}{As input}
+ \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{sd}{As input}
+ \item{sd2}{As input}
+ \item{delta1}{As input}
+ \item{delta0}{As input}
+ \item{se}{standard error for estimate of difference in treatment group means}
+
}
\seealso{\link{gsDesign package overview}}
\author{Keaven Anderson \email{keaven_anderson at merck.com}}
@@ -39,12 +57,12 @@
\examples{
# EXAMPLES
# equal variances
-nNormal(delta1=.5,sigma=1.1,alpha=.025,beta=.2)
+nNormal(delta1=.5,sd=1.1,alpha=.025,beta=.2)
# unequal variances
-nNormal(delta1=.5,sigma=1.1,sigalt=2,alpha=.025,beta=.2)
+nNormal(delta1=.5,sd=1.1,sd2=2,alpha=.025,beta=.2)
# unequal sample sizes
-nNormal(delta1=.5,sigma=1.1,alpha=.025,beta=.2, ratio=2)
+nNormal(delta1=.5,sd=1.1,alpha=.025,beta=.2, ratio=2)
# non-inferiority assuming a better effect than null
-nNormal(delta1=.5,delta0=-.1,sigma=1.2)
+nNormal(delta1=.5,delta0=-.1,sd=1.2)
}
\keyword{design}
More information about the Gsdesign-commits
mailing list