Thank you so much for the help! It is really appreciated! Dongli
On Nov 15, 2011, at 9:19 AM, Marc Schwartz <marc_schwa...@me.com> wrote: > Hi Dongli, > > Sorry for the delay in following up. > > You might want to read the dsDesignManual.pdf document, which is available in > the 'inst/doc' folder in the package source tarball on CRAN, or in the > package 'doc' directory in your R installation. Use: > > system.file(package = "gsDesign") > > to get the package top directory for your installation. The above file will > be in the 'doc' sub-directory from there. It has more extensive worked > examples than the default package manual. > > > Simple non-inferiority example from ?nBinomial, with 2:1 ratio: > > n.Fix <- nBinomial(p1 = .677, p2 = .677, delta0 = 0.07, ratio = 2) > > >> n.Fix > [1] 2056.671 > > # Adjust that *up* to an integer multiple of 3 > n.Fix <- 2058 > > > # Change 'outtype' to 2 if you want to see per arm sample sizes > # eg: >> nBinomial(p1 = .677, p2 = .677, delta0 = 0.07, ratio = 2, outtype = 2) > $n1 > [1] 685.5569 > > $n2 > [1] 1371.114 > > > > > # Simple default GS design using the fixed study design sample size from > above, > # which is not yet adjusted for interim analyses > >> gsDesign(n.fix = n.Fix) > Asymmetric two-sided group sequential design with > 90 % power and 2.5 % Type I Error. > Upper bound spending computations assume > trial continues if lower bound is crossed. > > ----Lower bounds---- ----Upper bounds----- > Analysis N Z Nominal p Spend+ Z Nominal p Spend++ > 1 734 -0.24 0.4057 0.0148 3.01 0.0013 0.0013 > 2 1468 0.94 0.8267 0.0289 2.55 0.0054 0.0049 > 3 2202 2.00 0.9772 0.0563 2.00 0.0228 0.0188 > Total 0.1000 0.0250 > + lower bound beta spending (under H1): > Hwang-Shih-DeCani spending function with gamma = -2 > ++ alpha spending: > Hwang-Shih-DeCani spending function with gamma = -4 > > Boundary crossing probabilities and expected sample size > assume any cross stops the trial > > Upper boundary (power or Type I Error) > Analysis > Theta 1 2 3 Total E{N} > 0.0000 0.0013 0.0049 0.0171 0.0233 1286.0 > 0.0715 0.1412 0.4403 0.3185 0.9000 1628.4 > > Lower boundary (futility or Type II Error) > Analysis > Theta 1 2 3 Total > 0.0000 0.4057 0.4290 0.1420 0.9767 > 0.0715 0.0148 0.0289 0.0563 0.1000 > > > So rather than needing 2058 from the fixed design, you actually need 2202 > (1468 in one arm and 734 in the other). > > I would urge you to read the manual I reference above and as Andy has noted > in his reply, contact Keaven directly for further assistance with this > package. > > HTH, > > Marc > > On Nov 14, 2011, at 5:13 PM, Dongli Zhou wrote: > >> Hi, Marc, >> >> Thank you very much for the reply. I'm using the gsDesign function to create >> an object of type gsDesign. But the inputs do not include the 'ratio' >> argument. >> >> Dongli >> >> On Nov 14, 2011, at 5:50 PM, Marc Schwartz <marc_schwa...@me.com> wrote: >> >>> On Nov 14, 2011, at 4:11 PM, Dongli Zhou wrote: >>> >>>> I'm trying to use gsDesign for a noninferiority trial with binary >>>> endpoint. Did anyone know how to specify the trial with different sample >>>> sizes for two treatment groups? Thanks in advance! >>> >>> >>> Hi, >>> >>> Presuming that you are using the nBinomial() function, see the 'ratio' >>> argument, which defines the desired sample size ratio between the two >>> groups. >>> >>> See ?nBinomial and the examples there, which does include one using the >>> 'ratio' argument. >>> >>> HTH, >>> >>> Marc Schwartz >>> > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.