pub struct TTestPower;Expand description
Power of a one-sample (or paired) t-test.
effect_size is the standardized mean (Cohen’s d), nobs the sample size,
and df defaults to nobs − 1. The power integrates the noncentral
t-distribution with noncentrality d·√nobs. Mirrors the reference
ttest_power.
Implementations§
Source§impl TTestPower
impl TTestPower
Sourcepub fn power(
&self,
effect_size: f64,
nobs: f64,
alpha: f64,
df: Option<f64>,
alternative: Alternative,
) -> f64
pub fn power( &self, effect_size: f64, nobs: f64, alpha: f64, df: Option<f64>, alternative: Alternative, ) -> f64
Power at the given configuration. df = None uses nobs − 1.
Sourcepub fn solve_power(
&self,
effect_size: f64,
alpha: f64,
power: f64,
alternative: Alternative,
) -> f64
pub fn solve_power( &self, effect_size: f64, alpha: f64, power: f64, alternative: Alternative, ) -> f64
Solve for the sample size nobs that achieves power at the given
effect_size and alpha. Inverts the monotone power-in-nobs curve by
bracketed bisection (with df = nobs − 1).
Trait Implementations§
Source§impl Clone for TTestPower
impl Clone for TTestPower
Source§fn clone(&self) -> TTestPower
fn clone(&self) -> TTestPower
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TTestPower
Source§impl Debug for TTestPower
impl Debug for TTestPower
Source§impl Default for TTestPower
impl Default for TTestPower
Source§fn default() -> TTestPower
fn default() -> TTestPower
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TTestPower
impl RefUnwindSafe for TTestPower
impl Send for TTestPower
impl Sync for TTestPower
impl Unpin for TTestPower
impl UnsafeUnpin for TTestPower
impl UnwindSafe for TTestPower
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more