On Wed, Oct 5, 2011 at 12:44 PM, Scott Raynaud <scott.rayn...@yahoo.com> wrote: > Hope I did this right. I repeated what I'd done before: > > 1) Opened script > 2) Selected run all (this produced my inital post > > Then as suggested I: > > 3) Typed ls() > 4) Saw that the function was present and issued sshc(100,10) > > Here's what I got: > >> ls() > [1] "c.searchd" "convex" "Epower" "nef" "nef2" "power1.f" > [7] "ss.rand" "sshc" "vertex" >> sshc(100,10) > Error in return(ne = ne, Ep = Ep1) : > multi-argument returns are not permitted > So it looks like I need to change the return(ne = ne, Ep = Ep1) to two > separate lines, correct? > > On a brighter note, I did get a power curve as expected. One thing I don't > understand is the meaning of the arguments in sshc(100,10).
There are some comments in the function code that tell you: # rc number of response in historical control group # nc sample size in historical control # d target improvement = Pe - Pc # method 1=method based on the randomized design # 2=Makuch & Simon method (Makuch RW, Simon RM. Sample size considerations # for non-randomized comparative studies. J of Chron Dis 1980; 3:175-181. # 3=uniform power method ######## optional Input: - and so on. Beyond that, I'll have to defer to people who know what this is actually trying to compute... Also, its highly possible that this code has already been ported to R - lots of things have. If you know what its meant to compute then a quick search might get you running quicker. Barry ______________________________________________ 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.