|
| 1 | +# RMCP Streamlit Cloud Demo |
| 2 | + |
| 3 | +An interactive web interface demonstrating RMCP's econometric capabilities with Claude AI integration. |
| 4 | + |
| 5 | +## 🌐 Live Demo |
| 6 | + |
| 7 | +**🚀 Try it now:** [RMCP on Streamlit Cloud](https://your-app-url.streamlit.app) |
| 8 | + |
| 9 | +## 🔧 Local Development |
| 10 | + |
| 11 | +1. **Install Dependencies:** |
| 12 | + ```bash |
| 13 | + pip install -r requirements.txt |
| 14 | + ``` |
| 15 | + |
| 16 | +2. **Run the App:** |
| 17 | + ```bash |
| 18 | + streamlit run app.py |
| 19 | + ``` |
| 20 | + |
| 21 | +3. **Open in Browser:** |
| 22 | + - Navigate to http://localhost:8501 |
| 23 | + |
| 24 | +## ☁️ Deploy to Streamlit Community Cloud |
| 25 | + |
| 26 | +1. **Fork this repository** |
| 27 | +2. **Connect to Streamlit Cloud:** |
| 28 | + - Go to [share.streamlit.io](https://share.streamlit.io) |
| 29 | + - Connect your GitHub account |
| 30 | + - Select this repository |
| 31 | + - Set main file path: `streamlit/app.py` |
| 32 | +3. **Deploy!** |
| 33 | + |
| 34 | +## 🔧 Setup |
| 35 | + |
| 36 | +### Claude API Key |
| 37 | +1. Get your API key from [Claude Console](https://console.anthropic.com/) |
| 38 | +2. Enter it in the sidebar when the app starts |
| 39 | +3. The key is stored only for your session (not saved) |
| 40 | + |
| 41 | +### Data Upload |
| 42 | +- Upload CSV files with your data |
| 43 | +- The app will show a preview and data information |
| 44 | +- All analyses work with your uploaded data |
| 45 | + |
| 46 | +## 📊 Available Tools |
| 47 | + |
| 48 | +### 📈 Descriptive Statistics |
| 49 | +- **Summary Statistics**: Mean, median, mode, variance, etc. |
| 50 | +- **Correlation Analysis**: Pearson and Spearman correlations |
| 51 | +- **Outlier Detection**: Identify and analyze outliers |
| 52 | + |
| 53 | +### 📊 Regression Analysis |
| 54 | +- **Linear Regression**: Simple and multiple regression |
| 55 | +- **Logistic Regression**: Binary outcome modeling |
| 56 | +- **Panel Regression**: Fixed effects, random effects |
| 57 | + |
| 58 | +### 🧪 Statistical Tests |
| 59 | +- **T-Tests**: One-sample, two-sample, paired |
| 60 | +- **Chi-Square Tests**: Independence testing |
| 61 | +- **Normality Tests**: Shapiro-Wilk, Kolmogorov-Smirnov |
| 62 | +- **Stationarity Tests**: Augmented Dickey-Fuller |
| 63 | + |
| 64 | +### 📉 Time Series Analysis |
| 65 | +- **ARIMA Models**: Autoregressive integrated moving average |
| 66 | +- **VAR Models**: Vector autoregression |
| 67 | +- **Forecasting**: Time series predictions |
| 68 | +- **Cointegration Tests**: Long-run relationships |
| 69 | + |
| 70 | +### 🔄 Data Transformations |
| 71 | +- **Lag Variables**: Create lagged versions |
| 72 | +- **Difference Variables**: First/second differences |
| 73 | +- **Winsorization**: Outlier treatment |
| 74 | +- **Standardization**: Z-score, min-max scaling |
| 75 | + |
| 76 | +### 📊 Visualizations |
| 77 | +- **Scatter Plots**: With trend lines and grouping |
| 78 | +- **Time Series Plots**: Multiple variables over time |
| 79 | +- **Histograms**: Distribution analysis |
| 80 | +- **Correlation Heatmaps**: Visual correlation matrices |
| 81 | + |
| 82 | +### 🎯 Advanced Econometrics |
| 83 | +- **Instrumental Variables**: 2SLS estimation |
| 84 | +- **Panel Fixed Effects**: Within-group estimation |
| 85 | +- **Difference-in-Differences**: Causal inference |
| 86 | +- **Regression Discontinuity**: Threshold effects |
| 87 | + |
| 88 | +### 🤖 Machine Learning |
| 89 | +- **Random Forest**: Ensemble modeling |
| 90 | +- **Decision Trees**: Classification and regression |
| 91 | +- **Clustering**: K-means, hierarchical |
| 92 | +- **PCA Analysis**: Dimensionality reduction |
| 93 | + |
| 94 | +## 🤖 Claude AI Assistant |
| 95 | + |
| 96 | +The built-in Claude AI assistant can help you: |
| 97 | +- Choose appropriate statistical methods |
| 98 | +- Interpret analysis results |
| 99 | +- Suggest next steps in your research |
| 100 | +- Explain complex statistical concepts |
| 101 | + |
| 102 | +Simply ask questions like: |
| 103 | +- "What regression method should I use for this data?" |
| 104 | +- "How do I interpret these coefficients?" |
| 105 | +- "What does this p-value mean?" |
| 106 | + |
| 107 | +## 📁 Example Data |
| 108 | + |
| 109 | +The app works with any CSV file. Your data should have: |
| 110 | +- Column headers in the first row |
| 111 | +- Numeric variables for quantitative analysis |
| 112 | +- Categorical variables for grouping/factors |
| 113 | +- Time variables in standard formats (for time series) |
| 114 | + |
| 115 | +## 🔒 Privacy & Security |
| 116 | + |
| 117 | +- All analysis runs locally with your R installation |
| 118 | +- Data is processed temporarily and not stored |
| 119 | +- Claude API key is session-only (not saved) |
| 120 | +- Uploaded files are automatically cleaned up |
| 121 | + |
| 122 | +## 🛠️ Technical Details |
| 123 | + |
| 124 | +- **Backend**: R statistical computing via subprocess |
| 125 | +- **Frontend**: Streamlit web interface |
| 126 | +- **AI Integration**: Anthropic Claude API |
| 127 | +- **Data Processing**: Pandas DataFrames |
| 128 | +- **Visualization**: R ggplot2 + Plotly integration |
| 129 | + |
| 130 | +## 📞 Support |
| 131 | + |
| 132 | +- Check the troubleshooting guide in `docs/troubleshooting.md` |
| 133 | +- Report issues on GitHub |
| 134 | +- Consult R documentation for statistical methods |
| 135 | + |
| 136 | +## 🎯 Use Cases |
| 137 | + |
| 138 | +Perfect for: |
| 139 | +- **Academic Research**: Econometric analysis for papers |
| 140 | +- **Business Analytics**: Market research and forecasting |
| 141 | +- **Policy Analysis**: Causal inference and impact evaluation |
| 142 | +- **Financial Modeling**: Risk analysis and portfolio optimization |
| 143 | +- **Data Science**: Exploratory analysis and feature engineering |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +*Powered by RMCP (R Model Context Protocol) - Making advanced econometrics accessible to everyone.* |
0 commit comments