[R] qt with ncp?
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Mon May 7 18:45:32 CEST 2001
Peter Malewski <peter.malewski at gmx.de> writes:
> Does anybody has a function or idea how to calculate qt with a noncentrality
> parameter? I'm porting a SAS-macro for equivalence (Wellek, 1994 TT2ST) to R
> and it seems that I need this to calculate tinv (SAS-command, I hope that
> this is R's qt,...I get the SAS-macro manual next week).
The easiest way is probably to use something like
uniroot(function(x)pt(x, df, ncp) - p, c(-1e7,1e7))
It's not going to be fast, but if you just need one of them...
(Look inside power.t.test for variations on the theme)
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help