Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Michael McCulloch <mm@pinestreetfoundation.org> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Re: xsampsi produces inconsistent results |

Date |
Sun, 6 Jun 2010 12:58:08 -0700 |

Thank you Steve for the explanation. On Jun 6, 2010, at 3:34 AM, Steve Samuels wrote:

In other words, the effect size (3.651 = delta/sd) is unrealistic; the program is computing n = 1 per group, with df = 0. That the program fails here is reasonable, although the error message could be better. SteveOn Sun, Jun 6, 2010 at 12:00 AM, Joseph Coveney <jcoveney@bigplanet.com> wrote:Michael McCulloch wrote:I'm using -xsampsi- to estimate sample sizes for a crossoverexperiment.I compared two examples, each with alpha=0.25, and beta=0.20. Experiment 1 (where mean difference =30, and its standard deviation = 45): xsampsi, alpha(0.025) beta(0.20) delta(30) stddev(45) Experiment 2 (where mean difference =2.3, and its standard deviation = 0.63): xsampsi, alpha(0.025) beta(0.20) delta(2.3) stddev(.63) The first example produces a result, but the second leads to error message:"Need to install package 'nct' to compute non-central tdistribution"However, I have installed -nct-. Any feedback would be appreciated! -------------------------------------------------------------------------------- The complete output of your second case is shown below.You can see that it's trying to compute a t statistic of an N of 1,which givesrise to a negative degrees of freedom for the quantile computation,which givesrise to a missing value for the t quantile, which when fed to -nct-(set traceon to see the call to -nct-) gives rise to a nonzero return code,which istrapped with the omnibus (and in this case erroneous) error message.-xsampsi- is user-written, not official. I recommend contactingthe authorwith the bug report. In the meantime, you can use simulation to do your power analysis. Joseph Coveney . xsampsi, alpha(0.025) beta(0.20) delta(2.3) stddev(.63) Sample size for cross-over trial (AB/BA) according to Senn 1991: 'Cross-over trials in clinical research'Parameters below expressed in terms of the basic estimator, thetreatmentcontrast. --------------- Alpha level = 0.025 Power = 0.800 Zalpha = 2.241 Zbeta = 0.842 Detectable effect size = 2.300 Std.dev. of basic estimator = 0.630 Approximate N (normal) = 1 Critical value of t(df=-1,0.013) = . Noncentrality parameter of t = 3.651 Need to install package 'nct' to compute non-central t distribution r(999); * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/-- Steven Samuels sjsamuels@gmail.com 18 Cantine's Island Saugerties NY 12477 USA Voice: 845-246-0774 Fax: 206-202-4783 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

Best wishes, Michael McCulloch, LAc MPH PhD Pine Street Foundation 124 Pine Street San Anselmo, CA 94960-2674 tel: 415-407-1357 fax: 206-338-2391 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: xsampsi produces inconsistent results***From:*Michael McCulloch <mm@pinestreetfoundation.org>

**st: Re: xsampsi produces inconsistent results***From:*"Joseph Coveney" <jcoveney@bigplanet.com>

**Re: st: Re: xsampsi produces inconsistent results***From:*Steve Samuels <sjsamuels@gmail.com>

- Prev by Date:
**Re: st: RE: Monte Carlo Simulation w/ Pareto Dist. on Tails** - Next by Date:
**st: Fixed/Random or Random Coeffcient Models** - Previous by thread:
**Re: st: Re: xsampsi produces inconsistent results** - Next by thread:
**st: Time dependent ROC** - Index(es):