SecreC 2 language  2.8.0 (2023.09)
Language and standard library reference
Functions

Functions

template<domain D>
D float32 chiSquared (D uint32[[2]] contTable)
 
template<domain D>
D float64 chiSquared (D uint64[[2]] contTable)
 

Detailed Description

Perform Pearson's chi-squared test of independence.

Note
D - any protection domain
Supported types - int32 / int64
This version does not do continuity correction so the R equivalent is chisq.test(contingencyTable, correct=FALSE)
Parameters
contTable- contingency table in the format
CasesControls
Option 1c1d1
Option 2c2d2
Option 3c3d3
Returns
returns the test statistic
Leakage
None

Function Documentation

◆ chiSquared() [1/2]

D float32 chiSquared ( D uint32[[2]]  contTable)

◆ chiSquared() [2/2]

D float64 chiSquared ( D uint64[[2]]  contTable)