finding ncp for t distribution

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

finding ncp for t distribution

Matthieu Dubois
Dear R-users,


I am wondering whether R implements a function returning the non central
parameter of a t distribution (equivalent of the TnoncT function from
SAS), given /x/ a value from a t distribution, /df /the  degrees of
freedom and /p/ the probability of x under this  distribution.


Thanks  a lot,


Matthieu


--

Matthieu Dubois, /Ph.D/. /Student/

Cognitive Neuroscience Unit, UCL, Belgium



        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: finding ncp for t distribution

Dimitris Rizopoulos
you could try the following:

f <- function(delta, pr, x, df) pt(x, df = df, ncp = delta) - pr
out <- uniroot(f, c(0, 37.62), pr = 0.18, x = 0.9, df = 4)
##########3
out$root
pt(0.9, 4, out$root)


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://www.med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


----- Original Message -----
From: "Matthieu Dubois" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, March 02, 2006 9:39 AM
Subject: [R] finding ncp for t distribution


> Dear R-users,
>
>
> I am wondering whether R implements a function returning the non
> central
> parameter of a t distribution (equivalent of the TnoncT function
> from
> SAS), given /x/ a value from a t distribution, /df /the  degrees of
> freedom and /p/ the probability of x under this  distribution.
>
>
> Thanks  a lot,
>
>
> Matthieu
>
>
> --
>
> Matthieu Dubois, /Ph.D/. /Student/
>
> Cognitive Neuroscience Unit, UCL, Belgium
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Loading...