profandyfield / discovr

discovr package for R to accompany Discovering Statistics Using R and RStudio
133 stars 25 forks source link

calculation of alpha #19

Closed cmadland closed 6 months ago

cmadland commented 6 months ago

https://github.com/profandyfield/discovr/blob/342aad3d3d09d7b4424bfb31527828fd0ccc3975/inst/tutorials/discovr_18/discovr_18.Rmd#L844

I get different values for alpha here:

Reliability analysis   
Call: psych::alpha(x = dplyr::select(raq_tib, raq_06, raq_07, raq_10, 
    raq_13, raq_14, raq_15, raq_18))

  raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
      0.77      0.77    0.75      0.32 3.3 0.0069  3.5 0.64     0.29

    95% confidence boundaries 
         lower alpha upper
Feldt     0.75  0.77  0.78
Duhachek  0.76  0.77  0.78

whereas you report 𝛼 = 0.80 [0.79, 0.81]

I understand that my values are still within the range we are looking for, but just wondering if I should be concerned about the difference.

profandyfield commented 6 months ago

The difference is because you have missed raq_05 in your list of variables.

cmadland commented 6 months ago

Thanks, Andy. Didn't you exclude raq_05 as well? Line 803

image

...oh, I see it. You say you exclude it on line 803, but raq_05 is still in the calculation on 819.

Thanks again!

profandyfield commented 6 months ago

yeah, I agree it's a bit confusing - I have fixed it in the version I've just pushed to github so the solution code/text is consistent with omitting raq_05. Thanks for pointing this out.