datashield / dsBaseClient

DataSHIELD client side base functions
https://www.datashield.org/
GNU General Public License v3.0
11 stars 24 forks source link

chi squared test returns NaN if useNA="always" in ds.table #488

Open davraam opened 1 year ago

davraam commented 1 year ago

chi squared test returns NaN if useNA="always" (the default option) in ds.table.

Here is an example with the titanic data:

ds.table(rvar="D$Sex", cvar="D$Survived", report.chisq.tests = TRUE, datasources = connections)

Pearson's Chi-squared test data: combine.array.all.sources X-squared = NaN, df = 4, p-value = NA

If useNA is set to "no", the function returns the numeric value of the chi-squared statistic.