Enhanced Two-Way Frequency Analysis with BlueSky Integration
Source:R/enhancedtwowayfrequency.h.R
enhancedtwowayfrequency.RdUsage
enhancedtwowayfrequency(
data,
rowVar,
colVar,
cellPercent = TRUE,
rowPercent = FALSE,
colPercent = FALSE,
showCounts = TRUE,
showTotals = TRUE,
chiSquareTest = TRUE,
fisherTest = FALSE,
continuityCorrection = TRUE,
associationMeasures = TRUE,
residualAnalysis = FALSE,
expectedFrequencies = FALSE,
minimumExpected = 5,
robustErrorHandling = TRUE,
showDiagnostics = FALSE,
detailedOutput = FALSE,
clinicalInterpretation = TRUE,
showRecommendations = FALSE,
bluesky_integration = TRUE,
comprehensive_output = FALSE,
heatmapPlot = FALSE,
mosaicPlot = FALSE,
percentageDisplay = "percentage"
)Arguments
- data
.
- rowVar
.
- colVar
.
- cellPercent
Display percentages of total sample (BlueSky BSkyTwoWayFrequency feature)
- rowPercent
Display row-wise percentages (sum to 100\
colPercentDisplay column-wise percentages (sum to 100\ columns)
showCountsDisplay raw frequency counts in cross-tabulation
showTotalsInclude row and column totals in tables
chiSquareTestPerform Pearson's chi-square test for association
fisherTestPerform Fisher's exact test (recommended for small samples)
continuityCorrectionApply continuity correction for 2x2 tables
associationMeasuresCalculate Cramér's V, Phi coefficient, and other association measures
residualAnalysisCalculate and display standardized residuals for detecting patterns
expectedFrequenciesDisplay expected frequencies under independence assumption
minimumExpectedThreshold for warning about low expected frequencies
robustErrorHandlingUse BlueSky-style error handling with graceful degradation
showDiagnosticsDisplay diagnostic information about computations and assumptions
detailedOutputInclude comprehensive statistical details and interpretations
clinicalInterpretationProvide clinical context and interpretation guidance
showRecommendationsProvide recommendations based on analysis results
bluesky_integrationUse BlueSky R statistical environment features
comprehensive_outputInclude comprehensive statistical details and diagnostics
heatmapPlotCreate heatmap visualization of frequency table
mosaicPlotCreate mosaic plot showing proportional relationships
percentageDisplayFormat for displaying percentage values
A results object containing:
results$instructions | a html | ||||
results$observedFrequencies | a table | ||||
results$crossTabMatrix | a table | ||||
results$cellPercentMatrix | a table | ||||
results$rowPercentMatrix | a table | ||||
results$colPercentMatrix | a table | ||||
results$testResults | a table | ||||
results$associationMeasuresTable | a table | ||||
results$assumptionCheck | a table | ||||
results$diagnostics | Computational diagnostics and data quality assessment | ||||
results$comprehensiveAnalysisSummary | Enhanced statistical summary with BlueSky integration | ||||
results$recommendations | a html | ||||
results$clinicalInterpretationGuide | a html | ||||
results$methodsExplanation | a html | ||||
results$heatmapPlot | an image | ||||
results$mosaicPlot | an image | ||||
results$residualPlot | an image |
asDF or as.data.frame. For example:results$observedFrequencies$asDFas.data.frame(results$observedFrequencies)
Enhanced two-way frequency analysis toolkit with BlueSky integration for
comprehensive cross-tabulation analysis. Includes cell, row, and column
percentages, statistical tests for association, robust error handling,
and clinical interpretation guidance. Perfect for exploring relationships
between categorical variables in clinicopathological research.