User asks for any statistical analysis, hypothesis testing, group comparison, prediction, association, survival analysis, meta-analysis, causal inference, power/sample size, or mentions R statistical packages.
bash {baseDir}/scripts/run-rstats.sh schema --data <path>First time or errors: bash {baseDir}/scripts/run-rstats.sh doctor
Install by profile (only when needed):
ProfileScriptMethodsCoreinstall-core.Rt-test, regression, ANOVA, chi-sqSurvivalinstall-survival.RKM, Cox, competing risks, RMSTMissinginstall-missing.RMICE, MCAR testMixedinstall-mixed.RLMM, GLMM, GEE, ICCBayesinstall-bayes.Rbrms, Bayes factorsCausalinstall-causal.RPSM, IPTW, IV, DiD, RDD, TMLEMetainstall-meta.Rmeta-analysis, NMASEMinstall-sem.RSEM, CFA, lavaanDiagnosticinstall-diagnostic.RROC, kappa, alphaAdvancedinstall-advanced.RGAM, quantile, zero-inflatedPowerinstall-power.Rpower/sample size
json
{
"dataset_path": "<path>",
"analysis_type": "<type>",
"outcome": "<column>",
"predictors": ["<col1>"],
"hypothesis": "<plain language>",
"alpha": 0.05,
"seed": 42,
"output_dir": "<path>"
}
bash {baseDir}/scripts/run-rstats.sh analyze --spec <path>For the complete 82-method table with user intent mapping, see references/METHOD_TABLE.md.
Quick lookup — most common:
Intentanalysis_typeCompare 2 groupsttest or wilcoxonCompare 3+ groupsanova or kruskalCategorical associationchisq or fisherPredict continuouslinear_regressionPredict binarylogistic_regressionSurvival curveskaplan_meierSurvival regressioncox_regressionMeta-analysismeta_analysisCausal effectpropensity_match or didPower/sample sizepower_analysis
wilcoxon over ttestequal_var: false)fisher over chisqEvery analysis MUST include:
Language: "associated with" / "evidence suggests" — NEVER "proves" / "causes"
See references/SPEC_REFERENCE.md for required/optional fields per analysis_type.