cran / rcompanion

:exclamation: This is a read-only mirror of the CRAN R package repository. rcompanion — Functions to Support Extension Education Program Evaluation. Homepage: https://CRAN.R-project.org/package=rcompanion
4 stars 1 forks source link

Unexpected result of rcompanion::cramerV() #3

Open RIngyao opened 1 year ago

RIngyao commented 1 year ago

Determining effect size

data

df <- data.frame(control = c(13698, 7319, 2421), test = c(4697, 9577, 50357))

run cramerV

rcompanion::cramerV(as.matrix(df), verbose = TRUE)

output

        Rows          = 3
        Columns       = 2
        N             = 88070
        Chi-squared   = 37090
        Phi           = 0.4212
        Corrected Phi = NA
        V             = 0.649
        Corrected V   = NA

        Cramer V 
           0.649 

find the sum of control and test

13698+7319+2421+4697+9577+50357 #88069

why is N (88070) of the output not equal to 88069?

gaborcsardi commented 1 year ago

Hi, this is a read only mirror of CRAN, please see the package authors in the DESCRIPTION file. Look for Maintainer, BugReports and URL. Thanks!

SalvatoreMangiafico commented 7 months ago

All the output is rounded to the significant figures specified in the digits= option. Perhaps it shouldn't round the N. I'll change this.