Performs Chi-Square test and post-hoc pairwise comparisons.
Usage
chisqposttest(
data,
rows,
cols,
counts,
posthoc = "bonferroni",
sig = 0.05,
excl = FALSE,
exp = FALSE,
plot = FALSE,
showResiduals = FALSE,
showEducational = FALSE,
showDetailedTables = FALSE,
residualsCutoff = 2,
testSelection = "auto",
exportResults = FALSE,
clinicalPreset = "custom",
showClinicalSummary = TRUE,
showExampleInterpretations = FALSE,
copyReadySentences = FALSE,
showAssumptionsCheck = TRUE,
showGlossary = FALSE,
colorBlindSafe = FALSE
)Arguments
- data
The data as a data frame.
- rows
variable in the rows
- cols
variable in the columns
- counts
Frequency/weight variable for contingency table data. When specified, the data is treated as already summarized with counts per combination.
- posthoc
Method for p-value adjustment in post-hoc tests
- sig
alpha level for significance testing
- excl
exclude missing values from analysis
- exp
show expected values in the table
- plot
display plot of standardized residuals
- showResiduals
display standardized residuals analysis with interpretation
- showEducational
display educational guidance and explanations
- showDetailedTables
display individual 2x2 tables for each pairwise comparison
- residualsCutoff
critical value for identifying significant residuals (typically 2.0 or 3.0)
- testSelection
method for selecting statistical test for pairwise comparisons
- exportResults
Export comprehensive analysis results to downloadable format for further analysis
- clinicalPreset
Pre-configured settings for common clinical scenarios
- showClinicalSummary
Display natural-language summary of results for clinical interpretation
- showExampleInterpretations
Display example interpretations for significant findings
- copyReadySentences
Generate copy-ready sentences for clinical reports
- showAssumptionsCheck
Display validation of chi-square test assumptions
- showGlossary
Display glossary of statistical terms with clinical interpretations
- colorBlindSafe
Use color-blind friendly visualization options
Value
A results object containing:
results$todo | a html | ||||
results$chisqTable | a table | ||||
results$assumptionsCheck | a html | ||||
results$clinicalSummary | a html | ||||
results$educationalOverview | a html | ||||
results$weightedDataInfo | a html | ||||
results$contingencyTable | a html | ||||
results$residualsAnalysis | a html | ||||
results$multipleTestingInfo | a html | ||||
results$posthocTable | a table | ||||
results$detailedComparisons | a html | ||||
results$exportTable | a table | ||||
results$exampleInterpretations | a html | ||||
results$reportSentences | a html | ||||
results$glossaryPanel | a html | ||||
results$plot | an image |
Tables can be converted to data frames with asDF or as.data.frame. For example:
results$chisqTable$asDF
as.data.frame(results$chisqTable)