tests/testthat/_snaps/indttest.md

output from independent sample t test is as expected when alternative is less

Code
  ifr_ts_ind_ttest(hsb, female, write, alternative = "less")
Output
                                Group Statistics                                
  -----------------------------------------------------------------------------
    Group       Obs     Mean     Std. Err.    Std. Dev.    [95% Conf. Interval] 
  -----------------------------------------------------------------------------
      0          91    50.121      1.080       10.305       47.97539   52.26661  
      1         109    54.991      0.779        8.134       53.44689   56.53511  
  -----------------------------------------------------------------------------
   combined     200    52.775      0.67         9.479       51.45379   54.09621  
  -----------------------------------------------------------------------------
     diff       200    -4.87       1.304        9.231       -7.42623   -2.31377  
  -----------------------------------------------------------------------------

                        Independent Samples Test                        
                        ------------------------

                    Ho: mean(0) - mean(1) = diff = 0                    
                              Ha: diff < 0

  ---------------------------------------------------------------------
   Variable        Method        Variances    DF     t Value     P < t  
  ---------------------------------------------------------------------
    write          Pooled          Equal      198    -3.7341    0.0001  
    write       Satterthwaite     Unequal     170    -3.6564    0.0002  
  ---------------------------------------------------------------------

                  Test for Equality of Variances                  
  ---------------------------------------------------------------
   Variable      Method     Num DF    Den DF    F Value    P > F  
  ---------------------------------------------------------------
    write       Folded F      90       108       1.605     0.0188 
  ---------------------------------------------------------------

output from independent sample t test is as expected when alternative is greater

Code
  ifr_ts_ind_ttest(hsb, female, write, alternative = "greater")
Output
                                Group Statistics                                
  -----------------------------------------------------------------------------
    Group       Obs     Mean     Std. Err.    Std. Dev.    [95% Conf. Interval] 
  -----------------------------------------------------------------------------
      0          91    50.121      1.080       10.305       47.97539   52.26661  
      1         109    54.991      0.779        8.134       53.44689   56.53511  
  -----------------------------------------------------------------------------
   combined     200    52.775      0.67         9.479       51.45379   54.09621  
  -----------------------------------------------------------------------------
     diff       200    -4.87       1.304        9.231       -7.42623   -2.31377  
  -----------------------------------------------------------------------------

                        Independent Samples Test                        
                        ------------------------

                    Ho: mean(0) - mean(1) = diff = 0                    
                              Ha: diff > 0

  ---------------------------------------------------------------------
   Variable        Method        Variances    DF     t Value     P > t  
  ---------------------------------------------------------------------
    write          Pooled          Equal      198    -3.7341    0.9999  
    write       Satterthwaite     Unequal     170    -3.6564    0.9998  
  ---------------------------------------------------------------------

                  Test for Equality of Variances                  
  ---------------------------------------------------------------
   Variable      Method     Num DF    Den DF    F Value    P > F  
  ---------------------------------------------------------------
    write       Folded F      90       108       1.605     0.0188 
  ---------------------------------------------------------------

output from independent sample t test is as expected when alternative is both

Code
  ifr_ts_ind_ttest(hsb, female, write, alternative = "both")
Output
                                Group Statistics                                
  -----------------------------------------------------------------------------
    Group       Obs     Mean     Std. Err.    Std. Dev.    [95% Conf. Interval] 
  -----------------------------------------------------------------------------
      0          91    50.121      1.080       10.305       47.97539   52.26661  
      1         109    54.991      0.779        8.134       53.44689   56.53511  
  -----------------------------------------------------------------------------
   combined     200    52.775      0.67         9.479       51.45379   54.09621  
  -----------------------------------------------------------------------------
     diff       200    -4.87       1.304        9.231       -7.42623   -2.31377  
  -----------------------------------------------------------------------------

                        Independent Samples Test                        
                        ------------------------

                    Ho: mean(0) - mean(1) = diff = 0                    
                              Ha: diff ~= 0

  ---------------------------------------------------------------------
   Variable        Method        Variances    DF     t Value    P > |t| 
  ---------------------------------------------------------------------
    write          Pooled          Equal      198    -3.7341    0.0002  
    write       Satterthwaite     Unequal     170    -3.6564    0.0003  
  ---------------------------------------------------------------------

                  Test for Equality of Variances                  
  ---------------------------------------------------------------
   Variable      Method     Num DF    Den DF    F Value    P > F  
  ---------------------------------------------------------------
    write       Folded F      90       108       1.605     0.0188 
  ---------------------------------------------------------------

output from independent sample t test is as expected when alternative is all

Code
  ifr_ts_ind_ttest(hsb, female, write, alternative = "all")
Output
                                Group Statistics                                
  -----------------------------------------------------------------------------
    Group       Obs     Mean     Std. Err.    Std. Dev.    [95% Conf. Interval] 
  -----------------------------------------------------------------------------
      0          91    50.121      1.080       10.305       47.97539   52.26661  
      1         109    54.991      0.779        8.134       53.44689   56.53511  
  -----------------------------------------------------------------------------
   combined     200    52.775      0.67         9.479       51.45379   54.09621  
  -----------------------------------------------------------------------------
     diff       200    -4.87       1.304        9.231       -7.42623   -2.31377  
  -----------------------------------------------------------------------------

                          Independent Samples Test                         
                        ------------------------

                      Ho: mean(0) - mean(1) = diff = 0

        Ha: diff < 0            Ha: diff ~= 0             Ha: diff > 0

                                    Pooled                                   
  ------------------------------------------------------------------------
         t = -3.7341              t = -3.7341              t = -3.7341       
       P < t = 0.0001          P > |t| = 0.0002          P > t = 0.9999

                                Satterthwaite                                
  ------------------------------------------------------------------------
         t = -3.6564              t = -3.6564              t = -3.6564       
       P < t = 0.0002          P > |t| = 0.0003          P > t = 0.9998


                  Test for Equality of Variances                  
  ---------------------------------------------------------------
   Variable      Method     Num DF    Den DF    F Value    P > F  
  ---------------------------------------------------------------
    write       Folded F      90       108       1.605     0.0188 
  ---------------------------------------------------------------


Try the inferr package in your browser

Any scripts or data that you put into this service are public.

inferr documentation built on April 4, 2025, 2:08 a.m.