Skip to content

Commit 57dbcf6

Browse files
committed
new version
1 parent 31eebc5 commit 57dbcf6

16 files changed

Lines changed: 3666 additions & 207 deletions

README.md

Lines changed: 73 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
66
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
77

8-
**Version 0.2.0** - A production-ready Model Context Protocol (MCP) server that provides advanced statistical analysis capabilities through R. RMCP enables AI assistants and applications to perform sophisticated statistical modeling, econometric analysis, and data science tasks seamlessly.
8+
**Version 0.3.0** - A comprehensive Model Context Protocol (MCP) server with 33 statistical analysis tools across 8 categories. RMCP enables AI assistants and applications to perform sophisticated statistical modeling, econometric analysis, machine learning, time series analysis, and data science tasks seamlessly through natural conversation.
9+
10+
**🎉 Now with 33 statistical tools across 8 categories!**
911

1012
## 🚀 Quick Start
1113

@@ -24,64 +26,89 @@ That's it! RMCP is now ready to handle statistical analysis requests via the Mod
2426

2527
## ✨ Features
2628

27-
### Statistical Analysis ✅ Available Now
29+
### 📊 Comprehensive Statistical Analysis (33 Tools)
30+
31+
#### **Regression & Correlation**
2832
- **Linear Regression** (`linear_model`): OLS with robust standard errors, R², p-values
29-
- **Logistic Regression** (`logistic_regression`): Binary classification with odds ratios and accuracy
33+
- **Logistic Regression** (`logistic_regression`): Binary classification with odds ratios and accuracy
3034
- **Correlation Analysis** (`correlation_analysis`): Pearson, Spearman, and Kendall correlations
3135

32-
### Coming Soon 🚧
33-
- **Time Series Analysis**: ARIMA, VAR models, forecasting
34-
- **Panel Data Models**: Fixed effects, random effects regression
35-
- **Data Transformation**: Lag/lead variables, differencing, winsorization
36-
- **Advanced Diagnostics**: Heteroskedasticity, autocorrelation tests
37-
- **File Operations**: CSV analysis, data import/export
36+
#### **Time Series Analysis**
37+
- **ARIMA Modeling** (`arima_model`): Autoregressive integrated moving average with forecasting
38+
- **Time Series Decomposition** (`decompose_timeseries`): Trend, seasonal, remainder components
39+
- **Stationarity Testing** (`stationarity_test`): ADF, KPSS, Phillips-Perron tests
40+
41+
#### **Data Transformation**
42+
- **Lag/Lead Variables** (`lag_lead`): Create time-shifted variables for analysis
43+
- **Winsorization** (`winsorize`): Handle outliers by capping extreme values
44+
- **Differencing** (`difference`): Create stationary series for time series analysis
45+
- **Standardization** (`standardize`): Z-score, min-max, robust scaling
46+
47+
#### **Statistical Testing**
48+
- **T-Tests** (`t_test`): One-sample, two-sample, paired t-tests
49+
- **ANOVA** (`anova`): Analysis of variance with Types I/II/III
50+
- **Chi-Square Tests** (`chi_square_test`): Independence and goodness-of-fit
51+
- **Normality Tests** (`normality_test`): Shapiro-Wilk, Jarque-Bera, Anderson-Darling
52+
53+
#### **Descriptive Statistics**
54+
- **Summary Statistics** (`summary_stats`): Comprehensive descriptives with grouping
55+
- **Outlier Detection** (`outlier_detection`): IQR, Z-score, Modified Z-score methods
56+
- **Frequency Tables** (`frequency_table`): Counts and percentages with sorting
57+
58+
#### **Advanced Econometrics**
59+
- **Panel Regression** (`panel_regression`): Fixed/random effects for longitudinal data
60+
- **Instrumental Variables** (`instrumental_variables`): 2SLS with endogeneity testing
61+
- **Vector Autoregression** (`var_model`): Multivariate time series modeling
62+
63+
#### **Machine Learning**
64+
- **K-Means Clustering** (`kmeans_clustering`): Unsupervised clustering with validation
65+
- **Decision Trees** (`decision_tree`): Classification and regression trees
66+
- **Random Forest** (`random_forest`): Ensemble methods with variable importance
67+
68+
#### **Data Visualization**
69+
- **Scatter Plots** (`scatter_plot`): Correlation plots with trend lines
70+
- **Histograms** (`histogram`): Distribution analysis with density overlay
71+
- **Box Plots** (`boxplot`): Quartile analysis with outlier detection
72+
- **Time Series Plots** (`time_series_plot`): Temporal data visualization
73+
- **Correlation Heatmaps** (`correlation_heatmap`): Matrix visualization
74+
- **Regression Diagnostics** (`regression_plot`): Model validation plots
75+
76+
#### **File Operations**
77+
- **CSV Import** (`read_csv`): Flexible data loading with parsing options
78+
- **CSV Export** (`write_csv`): Data export with formatting control
79+
- **Dataset Information** (`data_info`): Comprehensive data structure analysis
80+
- **Data Filtering** (`filter_data`): Complex conditional data selection
3881

3982
### Production Ready
4083
- **MCP Protocol**: Full JSON-RPC 2.0 compliance
4184
- **Transport Agnostic**: stdio, HTTP, WebSocket support
4285
- **Error Handling**: Comprehensive error reporting and validation
4386
- **Security**: Safe R execution with controlled environment
4487

45-
## 🎯 Real-World Examples
88+
## 🎯 Real-World Usage
4689

47-
RMCP has been tested with realistic scenarios that researchers actually encounter:
90+
RMCP works through natural conversation with AI assistants. Here's how users actually interact with it:
4891

4992
### Business Analysis
50-
```python
51-
# Sales prediction analysis
52-
{
53-
"tool": "linear_model",
54-
"args": {
55-
"data": {"sales": [120, 135, 156, 175], "marketing": [10, 12, 16, 20]},
56-
"formula": "sales ~ marketing"
57-
}
58-
}
59-
```
93+
**You ask Claude:**
94+
> *"I have sales data and marketing spend. Can you analyze the ROI and tell me how effective our marketing is?"*
95+
96+
**Claude responds:**
97+
> *"Based on the regression analysis, every $1 spent on marketing generates $4.70 in additional sales. The relationship is highly significant (p < 0.001) and explains 97.9% of sales variation."*
6098
6199
### Economic Research
62-
```python
63-
# Macroeconomic relationships
64-
{
65-
"tool": "correlation_analysis",
66-
"args": {
67-
"data": {"gdp_growth": [2.1, 2.3, 1.8], "unemployment": [5.2, 5.0, 5.5]},
68-
"variables": ["gdp_growth", "unemployment"]
69-
}
70-
}
71-
```
100+
**You ask Claude:**
101+
> *"I have GDP growth and unemployment data for several countries. Can you test if this supports Okun's Law?"*
102+
103+
**Claude responds:**
104+
> *"The correlation analysis shows strong support for Okun's Law with r = -0.944. Higher GDP growth is strongly associated with lower unemployment across your dataset."*
72105
73106
### Data Science
74-
```python
75-
# Customer churn prediction
76-
{
77-
"tool": "logistic_regression",
78-
"args": {
79-
"data": {"churn": [0, 1, 0], "tenure": [24, 6, 36]},
80-
"formula": "churn ~ tenure",
81-
"family": "binomial"
82-
}
83-
}
84-
```
107+
**You ask Claude:**
108+
> *"Help me build a customer churn prediction model using tenure and monthly charges."*
109+
110+
**Claude responds:**
111+
> *"I've built a logistic regression model that achieves 100% accuracy. Longer tenure significantly reduces churn risk (11.3% less likely per month), while higher charges increase churn risk (3% more likely per dollar)."*
85112
86113
## 📊 Validated User Scenarios
87114

@@ -234,7 +261,10 @@ python tests/realistic_scenarios.py
234261
bash src/rmcp/scripts/test.sh
235262
```
236263

237-
**Current Test Coverage**: 100% success rate across 4 realistic user scenarios covering business analysis, economics research, data science, and academic research use cases.
264+
**Current Test Coverage**:
265+
-**MCP Interface**: 100% success rate (5/5 tests) - Validates actual Claude Desktop integration
266+
-**User Scenarios**: 100% success rate (4/4 tests) - Validates real-world usage patterns
267+
-**Conversational Examples**: All documented examples tested and verified working
238268

239269
## 🏗️ Architecture
240270

0 commit comments

Comments
 (0)