get_runtime_status
Report the running package version, tool names and storage mode; never plugin identity or local configuration. Parameters: - expectedPackageVersion: Optional package version to compare with the running one
expectedPackageVersion
io.github.crosstabsPublished by GitHub account crosstabsv1.5.3Updated Nov 8, 2026
Local survey workflow and statistical crosstab analysis with auditable evidence
Local statistics server that lets an assistant run crosstab and contingency-table tests, effect sizes and risk measures on integer counts.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Report the running package version, tool names and storage mode; never plugin identity or local configuration. Parameters: - expectedPackageVersion: Optional package version to compare with the running one
expectedPackageVersionPerform Pearson's chi-square test of independence. Parameters: - matrix: 2D contingency table as list of lists - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Test statistic, p-value, effect size (Cramér's V), and interpretation
matrixrequiredweightedrequiredinputSemanticsrequiredFisher's exact test for 2×2 tables. Parameters: - matrix: 2×2 contingency table - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Odds ratio, two-sided exact p-value, and large-sample 95% CI
matrixrequiredweightedrequiredinputSemanticsrequiredMcNemar's test for paired categorical data. Parameters: - matrix: 2×2 table of paired, non-negative integer outcome counts - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Coherent primary result plus exact and asymptotic secondary details
matrixrequiredweightedrequiredinputSemanticsrequiredG-test (likelihood ratio test) for contingency tables. Uses the same asymptotic chi-square reference distribution as Pearson's test, so it is not a small-sample exact-test substitute. Parameters: - matrix: Contingency table - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: G statistic, p-value, effect size
matrixrequiredweightedrequiredinputSemanticsrequiredCalculate the sample odds ratio with a 95% Woolf interval. Parameters: - matrix: [[exposed outcome+, exposed outcome-], [unexposed outcome+, unexposed outcome-]] - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: JSON-safe estimate, status, interval, and explicit table orientation
matrixrequiredweightedrequiredinputSemanticsrequiredCalculate relative risk with 95% confidence interval for 2x2 table. Parameters: - matrix: [[exposed outcome+, exposed outcome-], [unexposed outcome+, unexposed outcome-]] - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Relative risk, CI, and individual risks
matrixrequiredweightedrequiredinputSemanticsrequiredCalculate exposed-minus-unexposed risk difference for a 2×2 table. Labels the reciprocal absolute difference as NNT for lower exposed risk or NNH for higher exposed risk. Parameters: - matrix: [[exposed outcome+, exposed outcome-], [unexposed outcome+, unexposed outcome-]] - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Risk difference, interval, direction, and NNT/NNH when applicable
matrixrequiredweightedrequiredinputSemanticsrequiredCalculate Cramér's V effect size (standard and bias-corrected). Parameters: - matrix: Contingency table - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Standard and bias-corrected Cramér's V with interpretation
matrixrequiredweightedrequiredinputSemanticsrequiredCalculate phi coefficient for 2×2 table. Parameters: - matrix: 2×2 contingency table - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Phi coefficient and interpretation
matrixrequiredweightedrequiredinputSemanticsrequiredSpearman's rank correlation coefficient. Parameters: - ranks_x: First set of ranks - ranks_y: Second set of ranks Returns: Rho coefficient and p-value
ranks_xrequiredranks_yrequiredKendall's tau-b rank correlation. Parameters: - ranks_x: First set of ranks - ranks_y: Second set of ranks Returns: Tau coefficient and p-value
ranks_xrequiredranks_yrequiredGoodman-Kruskal's gamma for ordinal association. Parameters: - matrix: Contingency table with ordinal rows and columns - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Gamma coefficient with CI
matrixrequiredweightedrequiredinputSemanticsrequiredCohen's Kappa for inter-rater agreement (unweighted). Parameters: - matrix: Square confusion matrix - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Kappa coefficient with CI and interpretation
matrixrequiredweightedrequiredinputSemanticsrequiredWeighted Cohen's Kappa for ordinal agreement. Parameters: - matrix: Square confusion matrix - weights: "linear" or "quadratic" (default) - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Weighted kappa with CI and interpretation
matrixrequiredweightsweightedrequiredinputSemanticsrequiredCochran-Mantel-Haenszel test for stratified 2×2 tables. Tests association while controlling for a stratifying variable. Parameters: - tables: List of 2×2 contingency tables (one per stratum) - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: CMH chi-square, common odds ratio, RBG interval, and interpretation
tablesrequiredweightedrequiredinputSemanticsrequiredLinear-by-linear association test (Mantel-Haenszel trend test). Parameters: - matrix: Contingency table - row_scores: Optional numeric scores for rows (default: 0, 1, 2, ...) - col_scores: Optional numeric scores for columns - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Z-statistic and p-value for linear trend
matrixrequiredweightedrequiredcol_scoresrow_scoresinputSemanticsrequiredPower or sample size calculation for comparing two proportions. Parameters: - p1: Proportion in group 1 - p2: Proportion in group 2 - n: Sample size per group (if provided, calculates power) - alpha: Significance level (default 0.05) - power: Target power if calculating sample size (default 0.80) Returns: Two-sided normal-approximation power or required sample size
np1requiredp2requiredalphapowerBonferroni correction for multiple testing. Parameters: - p_values: List of p-values to correct - alpha: Family-wise error rate (default 0.05) Returns: Adjusted p-values and significance
alphap_valuesrequiredBenjamini-Hochberg false discovery rate correction. Parameters: - p_values: List of p-values to correct - alpha: FDR level (default 0.05) Returns: Adjusted significance with FDR control
alphap_valuesrequiredCalculate adjusted standardized residuals from a contingency table. Values above |2| are nominal cell-level flags. When many cells are inspected, use a multiplicity correction or an adjusted alpha. Parameters: - matrix: Contingency table - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Residuals matrix with interpretation
matrixrequiredweightedrequiredinputSemanticsrequiredFull post-hoc analysis after chi-square test. Includes standardized residuals, adjusted residuals, and chi-square contributions by cell. Parameters: - matrix: Contingency table - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Complete post-hoc analysis
matrixrequiredweightedrequiredinputSemanticsrequiredCalculate confidence interval for a proportion. Parameters: - successes: Number of successes - total: Total sample size - method: "wilson" (recommended), "agresti", or "normal" - countSemantics: Must be "integer_binomial_counts": successes and total are integer counts Returns: Proportion with 95% CI
totalrequiredmethodsuccessesrequiredcountSemanticsrequiredGenerate coordinates for mosaic plot visualization. Parameters: - matrix: Contingency table - row_labels: Optional labels for rows - col_labels: Optional labels for columns - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Cell coordinates with residual-based coloring
matrixrequiredweightedrequiredcol_labelsrow_labelsinputSemanticsrequiredGenerate data for stacked bar chart. Parameters: - matrix: Contingency table - by_rows: If True, groups are rows; if False, groups are columns - row_labels: Optional labels for rows - col_labels: Optional labels for columns - inputSemantics: Must be "descriptive_aggregate_values": the values are described, not used for survey-weighted inference - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Stacked bar chart data with proportions
matrixrequiredby_rowsweightedrequiredcol_labelsrow_labelsinputSemanticsrequiredCheck chi-square test assumptions. Verifies expected cell frequencies and provides recommendations. Parameters: - matrix: Contingency table - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Assumption validity and recommendations
matrixrequiredweightedrequiredinputSemanticsrequiredRecommend appropriate statistical tests for your data. Parameters: - matrix: Contingency table - data_type: "categorical" or "ordinal" - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Ranked test recommendations with rationales
matrixrequiredweightedrequireddata_typeinputSemanticsrequiredCreate contingency table from raw data. Parameters: - data: List of data objects with row and column variables - row_var: Name of row variable - col_var: Name of column variable Returns: Contingency table with labels
datarequiredcol_varrequiredrow_varrequiredParse CSV and create contingency table from two columns. Parameters: - csv_text: CSV content as string - row_var: Name of row variable column - col_var: Name of column variable column Returns: Contingency table with labels
col_varrequiredrow_varrequiredcsv_textrequiredSomers' D (asymmetric ordinal measure). Parameters: - matrix: Contingency table with ordinal rows and columns - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: d(Y|X), d(X|Y), and symmetric versions
matrixrequiredweightedrequiredinputSemanticsrequiredStuart's tau-c for rectangular ordinal tables. Parameters: - matrix: Contingency table - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Tau-c coefficient with standard error and p-value
matrixrequiredweightedrequiredinputSemanticsrequiredGoodman-Kruskal Lambda (proportional reduction in error). Parameters: - matrix: Contingency table - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Lambda values (asymmetric and symmetric)
matrixrequiredweightedrequiredinputSemanticsrequiredUncertainty Coefficient (entropy-based association measure). Parameters: - matrix: Contingency table - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Uncertainty coefficients and mutual information
matrixrequiredweightedrequiredinputSemanticsrequiredBreslow-Day test for homogeneity of odds ratios across strata. Parameters: - tables: List of 2×2 contingency tables (one per stratum) - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Test statistic, p-value, and whether ORs are homogeneous
tablesrequiredweightedrequiredinputSemanticsrequiredMonte Carlo estimate of a fixed-margin chi-square p-value. The workload envelope admits at most 100 rows, 100 columns, and 1,000 cells, with a total frequency of 9,007,199,254,740,991. It admits 100,000 simulations and 20,000,000 cell-simulations. Work runs in chunks of at most 512 simulations under a 32 MiB estimated numeric peak and a 30-second server deadline. MCP cancellation is observed between chunks. Parameters: - matrix: Contingency table - n_sim: Number of simulations from 1 through 100,000 (default 10000) - seed: Random seed for reproducibility - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Simulated p-value, observed statistic, method, seed, and workload receipt
seedn_simmatrixrequiredweightedrequiredinputSemanticsrequiredCorrespondence analysis for visualizing associations. Parameters: - matrix: Contingency table - row_labels: Optional row labels - col_labels: Optional column labels - inputSemantics: Must be "descriptive_aggregate_values": the values are described, not used for survey-weighted inference - weighted: Must be false; weighted or survey-design data is not accepted here Returns: 2D coordinates for biplot and explained variance
matrixrequiredweightedrequiredcol_labelsrow_labelsinputSemanticsrequiredChi-square with Yates continuity correction for 2×2 tables. Parameters: - matrix: 2×2 contingency table - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Yates-corrected chi-square and p-value
matrixrequiredweightedrequiredinputSemanticsrequiredAttributable or prevented risk measures for epidemiological studies. Parameters: - matrix: [[exposed outcome+, exposed outcome-], [unexposed outcome+, unexposed outcome-]] - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Direction-appropriate impact measures, risk-difference interval, relative-risk status, orientation, and causal caveat
matrixrequiredweightedrequiredinputSemanticsrequiredDetect outliers in numeric data. Parameters: - values: List of numeric values - method: "zscore" or "iqr" - threshold: Z-score cutoff (default 2.0) or IQR fence multiplier (default 1.5) Returns: Outlier statistics and identified outliers
methodvaluesrequiredthresholdCalculate multiple effect sizes for contingency table. Parameters: - matrix: Contingency table - inputSemantics: Must be "integer_frequency_counts": you confirm every cell is a non-negative integer count of observations - weighted: Must be false; weighted or survey-design data is not accepted here Returns: Cramér's V (corrected), phi, and contingency coefficient
matrixrequiredweightedrequiredinputSemanticsrequiredTURF (Total Unduplicated Reach and Frequency) for portfolios of k items. Parameters: - data: Respondent rows (one object per respondent) - items: 1–30 item columns (ratings, or 0/1 flags with reach_rule="binary") - k: Portfolio size, 1–8 - reach_rule: "top_box" (value ≥ scale_max), "top_2_box" (≥ scale_max − 1), "threshold" (≥ threshold) or "binary" (1 = reached, 0 = not) - scale_max: Scale maximum; inferred from the item columns when omitted - threshold: Minimum reached value for reach_rule="threshold" - weight_var: Optional weight column; non-positive or blank weights are dropped - must_include: Items forced into every portfolio - exclude: Items never considered - top: Number of ranked portfolios to return (1–50) Returns: Ranked portfolios with reach and frequency, the search method (exhaustive up to 50,000 combinations, otherwise greedy), and an incremental reach ladder over all eligible items
krequiredtopdatarequireditemsrequiredexcludescale_maxthresholdreach_ruleweight_varmust_includePenalty analysis for just-about-right (JAR) scales. Parameters: - data: Respondent rows - liking_var: Overall liking column (numeric) - jar_vars: JAR attribute columns coded 1..scale with the midpoint as just right - scale: 3, 5 or 7 points - weight_var: Optional weight column - action_threshold: Share of the base a side needs to be actionable (default 0.2) Returns: Per attribute and side: proportion, mean liking, mean drop versus the just-about-right group, weighted penalty, Welch t-test and action flag
datarequiredscalejar_varsrequiredliking_varrequiredweight_varaction_thresholdKey driver analysis by relative importance (Shapley values and Johnson's weights). Parameters: - data: Respondent rows - outcome_var: Numeric outcome column (e.g. overall satisfaction) - driver_vars: 2–15 numeric driver columns - weight_var: Optional weight column Returns: R², each driver's correlation, standardized beta, VIF, Shapley share of R² (exact over all subsets), Johnson relative weight, importance/ performance quadrant and collinearity warnings. Associative, not causal.
datarequiredweight_vardriver_varsrequiredoutcome_varrequiredNet Promoter Score with a margin of error. Parameters: - data: Respondent rows with a 0–10 score (use with score_var) - score_var: 0–10 likelihood-to-recommend column - segment_var: Optional column; each segment is tested against the rest - weight_var: Optional weight column (Kish effective n for the variance) - counts: Instead of rows, {"promoters": int, "passives": int, "detractors": int} - compare_counts: Second group's counts for a two-group z-test (second minus first) - confidence: Confidence level for intervals (default 0.95) Returns: NPS, shares, multinomial standard error, Wald and adjusted-Wald intervals, and segment or two-group comparisons
datacountsscore_varconfidenceweight_varsegment_varcompare_countsSurvey planning: completes for a margin of error, margin of error for n, or per-group sizes for comparing two proportions. Parameters: - calculation: "sample_size_for_margin", "margin_of_error" or "two_proportions" - margin_of_error: Target margin as a proportion (0.05 = ±5 points) - n: Completed interviews (for "margin_of_error") - confidence: Confidence level (default 0.95) - proportion: Expected proportion (0.5 is most conservative) - population: Optional population size for the finite population correction - design_effect: Design effect, at least 1 - response_rate: Optional response rate in (0, 1] to convert completes to invitations - p1, p2: Group proportions (for "two_proportions") - alpha: Two-sided significance level (default 0.05) - power: Target power (default 0.8) - allocation_ratio: n2/n1 (default 1) Returns: Required completes (and invitations), margin of error, or group sizes with and without the Fleiss continuity correction. For the power of a fixed design use power_analysis.
np1p2alphapowerconfidencepopulationproportioncalculationrequireddesign_effectresponse_ratemargin_of_error+1 moreScreen survey rows for speeders, straight-liners, duplicates and incomplete interviews. Parameters: - data: Respondent rows - columns: Columns for the incomplete and exact-duplicate checks (default: all) - duration_var: Interview duration column; enables the speeder check - speeder_percent_of_median: Flag durations below this % of the median (default 33) - speeder_min_seconds: Optional absolute floor; the larger threshold applies - grid_vars: Grid items in questionnaire order; enables the straight-liner check - straightliner_min_answered: Minimum answered grid items to judge a row (default 3) - id_var: Respondent ID column; later repeats are flagged - exact_duplicates: Also flag exact copies of earlier rows (default true) - max_missing_share: Flag rows with a blank share above this (null skips the check) - include_all_rows: Return every row's flags instead of flagged rows only Returns: Per-rule summaries, counts flagged/overlapping/kept, and row flags with reasons (1-based row numbers). Nothing is removed.
datarequiredid_varcolumnsgrid_varsduration_varexact_duplicatesinclude_all_rowsmax_missing_sharespeeder_min_secondsspeeder_percent_of_medianstraightliner_min_answeredRun one read-only SELECT/WITH query against a local or private database and write the result to a local file the crosstabs.com workspace opens. Parameters: - connectionEnvVar: NAME of an environment variable holding the SQLAlchemy URL (e.g. "CROSSTABS_DB_URL"). Never pass a URL or password here. - outputPath: Absolute path of the file to write; the extension picks the format (.sav, .dta, .csv, .xlsx; .parquet for other tools) - query: One SELECT or WITH statement (give query or table) - table: Table to read in full: table, schema.table or db.schema.table - limit: Keep at most this many rows (1 to 1,000,000) - labelsPath: Optional YAML/JSON file with variable labels, value labels, measure levels and user-missing codes - categorical: Text columns to code 1..k with value labels on request - columnComments: Use database column comments as variable labels (table only) - timeoutSeconds: Statement timeout, 1 to 21,600 seconds - overwrite: Replace outputPath if it already exists Returns: Written path, row and column counts, per-column schema (type, label, measure, value labels, notes) and the read-only protections applied. Results above 1,000,000 rows, 1,000 columns or 20,000,000 cells are refused, matching the browser import limits. Weights are never guessed and values are never recoded unless categorical coding is requested.
limitquerytableoverwritelabelsPathoutputPathrequiredcategoricalcolumnCommentstimeoutSecondsconnectionEnvVarrequiredPull responses from a survey platform into a local labelled file the crosstabs.com workspace opens, with question wording as variable labels, choices as value labels and multi-selects as 0/1 multiple-response sets. Credentials are read from the platform's environment variables on this machine (for example QUALTRICS_API_TOKEN, SURVEYMONKEY_ACCESS_TOKEN, REDCAP_API_TOKEN; run `crosstabs pull <platform> --help`). Never pass a token, key, secret or password in any argument. Parameters: - platform: qualtrics, surveymonkey, medallia, alchemer, typeform, google-forms, decipher, questionpro, jotform, surveysparrow, redcap, kobo, odk-central or limesurvey - surveyId: Survey/form id (Qualtrics SV_..., Decipher survey path, ODK "<projectId>/<xmlFormId>", Kobo asset uid, ...) - outputPath: Absolute path of the file to write; the extension picks the format (.sav, .dta, .csv, .xlsx; .parquet for other tools) - includePartial: Keep partial/in-progress responses (flagged in response_complete); by default only complete responses are kept - since: Only responses on or after this ISO date/time, where supported - until: Only responses before this ISO date/time, where supported - limit: Keep at most this many responses (1 to 1,000,000) - settings: Non-secret platform settings such as {"datacenter": "iad1"}, {"region": "eu"}, {"server": "..."}, {"api_url": "..."}, {"fields": "e_ltr,q_osat"} (Medallia), {"layout": "..."} (Decipher), {"include_identifiers": true} to keep IP/location/contact fields - overwrite: Replace outputPath if it already exists Returns: Written path and sidecar path, row/column counts, complete/partial counts, multiple-response sets, per-variable schema and notes. Platform weight fields are carried as plain variables; no weight is ever applied or guessed. Results above 1,000,000 rows, 1,000 variables or 20,000,000 cells are refused (the browser import limits).
limitsinceuntilplatformrequiredsettingssurveyIdrequiredoverwriteoutputPathrequiredincludePartial65% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
Declare a GitHub repository with a README, or serve resource_documentation in the OAuth protected-resource metadata.
Declare a license in the repository or the registry entry.