R Econometrics MCP Server
R MCP サーバー
R を通じて高度な計量経済モデリングとデータ分析機能を提供するモデル コンテキスト プロトコル (MCP) サーバー。このサーバーにより、AI アシスタントは高度な計量経済分析と統計分析をシームレスに実行できるようになり、データから迅速に洞察を得ることができます。
Related MCP server: aigroup-econ-mcp
特徴
**線形回帰:**オプションの堅牢な標準誤差を使用して線形モデルを実行します。
**パネル データ分析:**固定効果、ランダム効果、プーリング、間、および一次差分モデルを推定します。
操作変数: IV 回帰モデルを構築して推定します。
**診断テスト:**異分散性、自己相関、モデルの誤指定を評価します。
記述統計: R の summary() 機能を使用してデータセットの要約統計を生成します。
**相関分析:**変数間のピアソンまたはスピアマンの相関を計算します。
**グループ集計:**指定された列でデータをグループ化し、dplyr を使用して要約統計を計算します。
**リソース:**さまざまな計量経済学的手法の参考資料にアクセスします。
**プロンプト:**一般的な計量経済分析には、事前定義されたプロンプト テンプレートを使用します。
インストール
Dockerの使用(推奨)
Docker イメージをビルドします。
docker build -t r-econometrics-mcp .コンテナを実行します。
docker run -it r-econometrics-mcp手動インストール
必要な Python パッケージをインストールします。
pip install -r requirements.txt必要な R パッケージをインストールします (コンテナー外でサーバーを実行する場合)。
install.packages(c("plm", "lmtest", "sandwich", "AER", "jsonlite"), repos="https://cloud.r-project.org/")サーバーを実行します。
python rmcp.py使用法
サーバーは標準入出力を介して通信します。以下を実行すると、
python rmcp.py起動すると、標準入力からJSONメッセージが送られてくるのを待ちます。サーバーを手動でテストするには、コンパクトな(1行の)JSONメッセージを含むファイル(例:test_request.json)を作成してください。
例テスト
次の内容 (1 行の JSON) を含む test_request.json を作成します。
{"tool": "linear_model", "args": {"formula": "y ~ x1", "data": {"x1": [1,2,3,4,5], "y": [1,3,5,7,9]}, "robust": false}}次に以下を実行します:
cat test_request.json | python rmcp.py出力
{"coefficients": {"(Intercept)": -1, "x1": 2}, "std_errors": {"(Intercept)": 2.8408e-16, "x1": 8.5654e-17}, "t_values": {"(Intercept)": -3520120717017444, "x1": 23349839270207356}, "p_values": {"(Intercept)": 5.0559e-47, "x1": 1.7323e-49}, "r_squared": 1, "adj_r_squared": 1, "sigma": 2.7086e-16, "df": [2, 3, 2], "model_call": "lm(formula = formula, data = data)", "robust": false}Claude Desktopでの使用
Claudeデスクトップを起動
MCPサーバーパネルを開く
次の構成で新しいサーバーを追加します。
名前: R計量経済学
トランスポート: stdio
コマンド: path/to/python r_econometrics_mcp.py
(またはDockerを使用している場合): docker run -i r-econometrics-mcp
クエリの例
サーバーが接続されたら、Claude で使用できるクエリの例を次に示します。
線形回帰
Can you analyze the relationship between price and mpg in the mtcars dataset using linear regression?パネルデータ分析
I have panel data with variables gdp, investment, and trade for 30 countries over 20 years. Can you help me determine if a fixed effects or random effects model is more appropriate?操作変数
I'm trying to estimate the causal effect of education on wages, but I'm concerned about endogeneity. Can you help me set up an instrumental variables regression?診断テスト
After running my regression model, I'm concerned about heteroskedasticity. Can you run appropriate diagnostic tests and suggest corrections if needed?ツールリファレンス
線形モデル
線形回帰モデルを実行します。
パラメータ:
formula(文字列):回帰式(例:'y ~ x1 + x2')data(オブジェクト): 辞書/JSON オブジェクトとしてのデータセットrobust(ブール値、オプション):ロバスト標準誤差を使用するかどうか
パネルモデル
パネル データ モデルを実行します。
パラメータ:
formula(文字列):回帰式(例:'y ~ x1 + x2')data(オブジェクト): 辞書/JSON オブジェクトとしてのデータセットindex(配列):パネルのインデックス変数(例:['individual', 'time'])effect(文字列、オプション): 効果の種類: 'individual'、'time'、または 'twoways'model(文字列、オプション): モデルタイプ: 'within'、'random'、'pooling'、'between'、または 'fd'
診断
モデル診断を実行します。
パラメータ:
formula(文字列):回帰式(例:'y ~ x1 + x2')data(オブジェクト): 辞書/JSON オブジェクトとしてのデータセットtests(配列): 実行するテスト (例: ['bp', 'reset', 'dw'])
iv_回帰
操作変数回帰を推定します。
パラメータ:
formula(文字列): 回帰式 (例: 'y ~ x1 + x2 | z1 + z2')data(オブジェクト): 辞書/JSON オブジェクトとしてのデータセット
リソース
econometrics:formulas:一般的な計量経済モデルの定式化に関する情報econometrics:diagnostics:診断テストの参考文献econometrics:panel_data:Rによるパネルデータ分析ガイド
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
ライセンス
MITライセンス
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityNot gradedmaintenanceAI-powered quantitative research assistant with 45 tools for causal inference methods (DID, RDD, IV, PSM), regression analysis, power calculations, and statistical code generation in R, Stata, and Python.50
- AlicenseNot gradedqualityDmaintenanceEconometrics MCP server for regression, causal inference, time series, panel data, machine learning, and broader statistical analysis workflows.10MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to execute R code, create visualizations, analyze data, and manage packages through a local Rscript CLI.MIT
- AlicenseBqualityCmaintenanceecon-r-mcp is a local MCP server plus companion skill for reproducible applied econometrics and statistics workflows powered by headless R execution.17MIT
Related MCP Connectors
The statistical analyst in your AI chat — validated, citable, re-runnable analysis of your data.
Macro data for AI agents: GDP, inflation, unemployment & trade, any country. No API keys.
Macro data for AI agents: GDP, inflation, unemployment and more (World Bank, US BLS). No keys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/finite-sample/rmcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server