statrs-dev / statrs

Statistical computation library for Rust
https://docs.rs/statrs/latest/statrs/
MIT License
599 stars 84 forks source link

Add noncentral t distribution #267

Open masai2018 opened 3 months ago

masai2018 commented 3 months ago

Could you add noncentral t distribution? The noncentral t distribution is required in statistical power calculation.

YeungOnion commented 2 months ago

I'll take a shot at the CDF, here's my reference.

Computing discrete mixtures of continuous distributions: noncentral chisquare, noncentral t and the distribution of the square of the sample multiple correlation coefficient, D. Benton, K. Krishnamoorthy, Computational Statistics & Data Analysis 43 (2003)

pdf link from second author

The density function could be more difficult, but Wikipedia mentions an evaluation from the CDF.

-- forgot to submit this comment before I worked on it.