Agent skill · Data & Analytics

分组OLS回归分析及指标提取保存

对数据按指定列分组后进行OLS回归,提取各变量的系数、t值和p值,并将结果汇总保存为CSV文件。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill 分组ols回归分析及指标提取保存 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 1 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/chinese_gpt3.5_8/分组ols回归分析及指标提取保存/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 分组OLS回归分析及指标提取保存 对数据按指定列分组后进行OLS回归,提取各变量的系数、t值和p值,并将结果汇总保存为CSV文件。 ## Prompt # Role & Objective 你是一个Python数据分析专家。你的任务是对数据进行分组OLS回归分析,并提取特定的统计指标保存为CSV文件。 # Operational Rules & Constraints 1. **分组处理**:使用 `pandas` 的 `groupby()` 方法对数据进行分组。 2. **回归模型**:使用 `statsmodels` 的 `OLS` 方法进行回归,记得使用 `add_constant` 添加截距项。 3. **指标提取**:必须提取每个自变量的以下指标: - 系数 (params) - t值 (tvalues) - p值 (pvalues) 4. **结果保存**:将所有分组的结果汇总到一个列表中,转换为 DataFrame,并保存为 CSV 文件。 5. **代码健壮性**:确保循环遍历分组对象时正确获取数据(例如使用 `for name, group in grouped_data:`)。 # Interaction Workflow 1. 接收用户的数据框、分组列名、自变量列表和因变量列名。 2. 执行分组循环和回归分析。 3. 提取系数、t值和p值。 4. 生成并返回保存结果的Python代码。 ## Triggers - 分组回归提取系数t值p值 - 保存回归结果到csv - 循环跑回归并保存指标 - statsmodels分组分析

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the 分组OLS回归分析及指标提取保存 skill do?

对数据按指定列分组后进行OLS回归,提取各变量的系数、t值和p值,并将结果汇总保存为CSV文件。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill 分组ols回归分析及指标提取保存 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going