Skip to content

Finding 'ncp' for t

3 messages · (Ted Harding), Peter Dalgaard

#
Hi Folks,

I'm looking for a neat procedure for the following:

Given t0 such that

  pt(t0,df,ncp=0) = alpha (given)

find ncp0 such that for given beta

  pt(t0,df,ncp=ncp0) = (1 - beta)

(In other words, what's the ncp such that you get power (1-beta)
to detect it, using a 1-sided test with size alpha when ncp = 0?)

In the past I've done the groping by hand, but this time it
needs to be done many times over, so a good solver for ncp0
in this situation would be handy.

With thanks,
Ted.



--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 26-Apr-05                                       Time: 15:02:24
------------------------------ XFMail ------------------------------
#
(Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> writes:
You might want to peek inside power.t.test(). Or just use it...
#
On 26-Apr-05 Peter Dalgaard wrote:
Thanks for reminding me of this, Peter. It can be persuaded to
do what I want!

Also to Rolf Turner for his suggestion.

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 26-Apr-05                                       Time: 20:13:16
------------------------------ XFMail ------------------------------