Economics Analysis logo

Economics Analysis

Community
beita6969
economics-analysis

Economic analysis including econometrics, causal inference, time series economics, game theory, welfare analysis, and economic modeling. Use when user works with economic data, regression analysis, instrumental variables, difference-in-differences, RDD, panel data, or economic theory. Triggers on "econometrics", "regression", "causal inference", "instrumental variable", "difference-in-differences", "panel data", "game theory", "supply demand", "GDP", "inflation", "economic model".

Overview

Publisherbeita6969
RepositoryScienceClaw
Skill nameeconomics-analysis
Stars
950
Forks
106
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by beita6969 on GitHub. Read the source before you install it.

Installation

Install the Economics Analysis AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/beita6969/ScienceClaw/tree/main/skills/economics-analysis
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/beita6969/ScienceClaw.git /tmp/ScienceClaw
mkdir -p .claude/skills
cp -r /tmp/ScienceClaw/skills/economics-analysis .claude/skills/economics-analysis
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Economics Analysis in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Economics Analysis on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Economics Analysis is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Economics Analysis

Econometrics and economic modeling. Venv: source /Users/zhangmingda/clawd/.venv/bin/activate

Causal Inference Methods

Selection Guide

MethodWhen to UseKey Assumption
RCTCan randomize treatmentRandom assignment
IV (2SLS)Endogeneity, have instrumentExclusion restriction
DiDPolicy change, panel dataParallel trends
RDDTreatment at thresholdContinuity at cutoff
Matching/PSMObservational, rich covariatesSelection on observables
Synthetic ControlAggregate intervention, few treatedParallel trends (weighted)

Difference-in-Differences

python
import statsmodels.formula.api as smf

# Basic DiD
model = smf.ols('outcome ~ treated * post + C(unit) + C(time)', data=df).fit(cov_type='cluster', cov_kwds={'groups': df['unit']})
print(model.summary())
# DiD estimate = coefficient on treated:post interaction

Instrumental Variables (2SLS)

python
from linearmodels.iv import IV2SLS

# Y = β₀ + β₁X + ε, where X is endogenous
# Z is the instrument
model = IV2SLS.from_formula('outcome ~ 1 + controls + [endogenous ~ instrument]', data=df)
result = model.fit(cov_type='robust')
print(result.summary)

Regression Discontinuity

python
# Local linear regression around cutoff
from sklearn.linear_model import LinearRegression

bandwidth = 5  # choose appropriately
cutoff = 0
left = df[(df['running'] >= cutoff - bandwidth) & (df['running'] < cutoff)]
right = df[(df['running'] >= cutoff) & (df['running'] <= cutoff + bandwidth)]

# Fit separate regressions
model_left = LinearRegression().fit(left[['running']], left['outcome'])
model_right = LinearRegression().fit(right[['running']], right['outcome'])

# RDD estimate
rdd_effect = model_right.predict([[cutoff]])[0] - model_left.predict([[cutoff]])[0]

Panel Data

python
from linearmodels.panel import PanelOLS, RandomEffects, BetweenOLS

df = df.set_index(['entity', 'time'])

# Fixed effects
fe = PanelOLS.from_formula('y ~ x1 + x2 + EntityEffects + TimeEffects', data=df)
fe_result = fe.fit(cov_type='clustered', cluster_entity=True)

# Random effects
re = RandomEffects.from_formula('y ~ x1 + x2', data=df)
re_result = re.fit()

# Hausman test: FE vs RE
# If significant → use FE

Game Theory

python
import numpy as np
from scipy.optimize import linprog

# Nash equilibrium (2-player, finite)
def find_nash_pure(payoff_A, payoff_B):
    """Find pure strategy Nash equilibria"""
    nash = []
    rows, cols = payoff_A.shape
    for i in range(rows):
        for j in range(cols):
            # Check if i is best response to j, and j is best response to i
            if payoff_A[i,j] == max(payoff_A[:,j]) and payoff_B[i,j] == max(payoff_B[i,:]):
                nash.append((i, j))
    return nash

# Example: Prisoner's Dilemma
A = np.array([[-1, -3], [0, -2]])  # Row player payoffs
B = np.array([[-1, 0], [-3, -2]])  # Column player payoffs
print(f"Nash equilibria: {find_nash_pure(A, B)}")

Economic Data Sources

SourceDataAccess
FRED (St. Louis Fed)US macro datahttps://api.stlouisfed.org/fred/
World BankGlobal developmenthttps://api.worldbank.org/v2/
IMFInternational financeREST API
BLSUS labor statisticsREST API
OECDOECD country dataREST API
Penn World TableCross-country GDPDownload
CNKI/CSMARChinese economic dataInstitutional access

FRED API

bash
# Get GDP data (need API key)
curl -s "https://api.stlouisfed.org/fred/series/observations?series_id=GDP&api_key=YOUR_KEY&file_type=json"

World Bank API

bash
curl -s "https://api.worldbank.org/v2/country/CHN/indicator/NY.GDP.MKTP.CD?format=json&per_page=20"

Tips

  • Always cluster standard errors at the treatment level
  • Test parallel trends assumption for DiD
  • Report first-stage F-statistic for IV (F > 10 rule of thumb)
  • Use robust standard errors by default
  • For Chinese economic research, consider CSMAR and CNKI databases
  • Report economic significance alongside statistical significance

Frequently asked questions

What does the Economics Analysis AI skill do?

Economic analysis including econometrics, causal inference, time series economics, game theory, welfare analysis, and economic modeling. Use when user works with economic data, regression analysis, instrumental variables, difference-in-differences, RDD, panel data, or economic theory. Triggers on "econometrics", "regression", "causal inference", "instrumental variable", "difference-in-differences", "panel data", "game theory", "supply demand", "GDP", "inflation", "economic model".

Why use Economics Analysis on TypingMind?

Because you install it once and use it with any model. Economics Analysis is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Economics Analysis in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/beita6969/ScienceClaw/tree/main/skills/economics-analysis. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Economics Analysis?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Economics Analysis?

As many as you like. As long as a model supports skills, you can use Economics Analysis with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Economics Analysis AI skill free?

Yes. It is published on GitHub by beita6969 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇