← 返回
未分类

R Stats

82 statistical analysis methods in R — regression, survival, Bayesian, meta-analysis, causal inference, SEM, IRT, clinical trial design, and more. JSON spec...
82种R语言统计分析方法——回归、生存、贝叶斯、Meta分析、因果推断、结构方程模型(SEM)、项目反应理论(IRT)、临床试验设计等。
cuiweig cuiweig 来源
未分类 clawhub v1.1.0 2 版本 99743.5 Key: 无需
★ 3
Stars
📥 1,884
下载
💾 98
安装
2
版本
#latest

概述

OpenClaw R Stats

When to Use

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.

What This Skill Does NOT Do

  • Claim causality from observational data (use "associated with")
  • Run large exploratory fishing without clear user intent
  • Silently ignore assumption violations
  • Report only p-values (always include effect sizes and CIs)

Pre-Flight (Mandatory)

  1. Confirm dataset exists and is readable
  2. Run schema inspection: bash {baseDir}/scripts/run-rstats.sh schema --data
  3. Report: rows, columns, types, missing values
  4. If missing > 5%, warn. If n < 30, warn small sample.

Environment Setup

First time or errors: bash {baseDir}/scripts/run-rstats.sh doctor

Install by profile (only when needed):

ProfileScriptMethods
--------------------------
Coreinstall-core.Rt-test, regression, ANOVA, chi-sq
Survivalinstall-survival.RKM, Cox, competing risks, RMST
Missinginstall-missing.RMICE, MCAR test
Mixedinstall-mixed.RLMM, GLMM, GEE, ICC
Bayesinstall-bayes.Rbrms, Bayes factors
Causalinstall-causal.RPSM, IPTW, IV, DiD, RDD, TMLE
Metainstall-meta.Rmeta-analysis, NMA
SEMinstall-sem.RSEM, CFA, lavaan
Diagnosticinstall-diagnostic.RROC, kappa, alpha
Advancedinstall-advanced.RGAM, quantile, zero-inflated
Powerinstall-power.Rpower/sample size

Workflow

  1. Determine analysis type (see references/METHOD_TABLE.md)
  2. Inspect dataset schema
  3. Build JSON spec:
  4. {
      "dataset_path": "<path>",
      "analysis_type": "<type>",
      "outcome": "<column>",
      "predictors": ["<col1>"],
      "hypothesis": "<plain language>",
      "alpha": 0.05,
      "seed": 42,
      "output_dir": "<path>"
    }
    
  5. Save as .json, run: bash {baseDir}/scripts/run-rstats.sh analyze --spec
  6. Read summary.json + report.md
  7. Present: Summary → Statistics → Interpretation → Plots → Assumptions → Caveats

Analysis Selection

For the complete 82-method table with user intent mapping,

see references/METHOD_TABLE.md.

Quick lookup — most common:

Intentanalysis_type
----------------------
Compare 2 groupsttest or wilcoxon
Compare 3+ groupsanova or kruskal
Categorical associationchisq or fisher
Predict continuouslinear_regression
Predict binarylogistic_regression
Survival curveskaplan_meier
Survival regressioncox_regression
Meta-analysismeta_analysis
Causal effectpropensity_match or did
Power/sample sizepower_analysis

Automatic Method Switching

  • Non-normal + n < 30 → wilcoxon over ttest
  • Unequal variance → Welch t-test (equal_var: false)
  • Expected cells < 5 → fisher over chisq
  • Overdispersion in Poisson → suggest negative binomial
  • Heteroscedastic residuals → robust SE warning

Reporting Rules (Non-Negotiable)

Every analysis MUST include:

  • Sample size (n) and missing data handling
  • Method name and rationale
  • Point estimates with confidence intervals
  • Effect sizes (Cohen's d, η², R², OR, HR, etc.)
  • Assumption check results
  • Limitations

Language: "associated with" / "evidence suggests" — NEVER "proves" / "causes"

Spec Field Reference

See references/SPEC_REFERENCE.md for required/optional fields per analysis_type.

版本历史

共 2 个版本

  • v1.1.0 当前
    2026-05-03 04:05 安全 安全
  • v0.7.0
    2026-03-31 19:19 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Tavily 搜索

jacky1n7
通过 Tavily API 进行网页搜索(Brave 替代方案)。当用户要求搜索网页、查找来源或链接,且 Brave 网页搜索不可用时使用。
★ 272 📥 99,919
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 205 📥 66,561
data-analysis

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 137,011