Re: [R] Finding 'ncp' for t

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Wed 27 Apr 2005 - 01:42:48 EST

(Ted Harding) <Ted.Harding@nessie.mcc.ac.uk> writes:

> 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.

You might want to peek inside power.t.test(). Or just use it...

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed Apr 27 01:48:44 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:26 EST