Stataconda is a desktop GUI application that provides a Stata-like interface while applying Python's data science ecosystem under the hood. It accepts Stata commands, translates them into Python (using pandas, statsmodels, seaborn, etc.), executes the Python code, and formats the output to match Stata's familiar style.
- Stata-like Interface: Familiar command syntax and output formatting
- Python Backend: Leverages pandas, statsmodels, scikit-learn, and other Python libraries
- Interactive GUI: Command prompt, results window, variable list, and data browser
- Data Management: Support for CSV, Excel, and Stata .dta files
- Statistical Analysis: Comprehensive set of statistical commands
- Visualization: Rich plotting capabilities with matplotlib and seaborn
- Bash Integration: Execute shell commands directly from the interface
# Clone the repository
git clone https://github.com/elliottash/stataconda.git
cd stataconda
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run the application
python main.py- Launch the application
- Load a dataset using
use filename.dtaorimport filename.csv - Explore data with
browse,summarize, ordescribe - Run analyses using Stata-like commands
- Save results using
save filename.dta
Load a dataset from a file.
use filename.dta
import filename.csv- Supports .dta, .csv, and .xlsx files
- Automatically detects file type from extension
- Updates variable list and data browser
Save the current dataset to a file.
save filename.dta- Supports .dta, .csv, and .xlsx files
- Defaults to .dta if no extension provided
Export results to various formats.
export using filename.rtf- Supports .rtf, .csv, .xlsx, .html, .tex formats
- Used primarily for exporting regression results
Open the data browser to view and edit data.
browse
browse var1 var2Display overview of dataset variables.
describe
describe var1 var2Calculate summary statistics.
summarize
summarize var1 var2Create frequency tables.
tabulate var1
tabulate var1 var2Create new variables.
generate newvar = expressionModify existing variables.
replace var = expressionRemove variables or observations.
drop var1 var2
drop if conditionKeep specified variables or observations.
keep var1 var2
keep if conditionRename variables.
rename oldvar newvarRecode variable values.
recode var (1=2) (2=1)Create a copy of a variable.
clonevar newvar = oldvarAdd variable labels.
label variable var "label"Add value labels.
label values var valuelistAppend datasets.
append using filenameMerge datasets.
merge 1:1 keyvar using filenameJoin datasets by key variables.
joinby keyvar using filenameCreate cross-product of datasets.
cross using filenameLinear regression.
regress depvar indepvar1 indepvar2 [, options]Analysis of variance.
anova depvar indepvar1 indepvar2Linear regression with absorbed fixed effects.
areg depvar indepvar1 indepvar2, absorb(groupvar)Panel data regression.
xtreg depvar indepvar1 indepvar2, feFixed effects regression.
fe depvar indepvar1 indepvar2Binary outcome models.
logit depvar indepvar1 indepvar2
probit depvar indepvar1 indepvar2
logistic depvar indepvar1 indepvar2Count data models.
poisson depvar indepvar1 indepvar2
nbreg depvar indepvar1 indepvar2Censored/interval regression models.
tobit depvar indepvar1 indepvar2
intreg depvar indepvar1 indepvar2Instrumental variables regression.
ivregress 2sls depvar (endogvar = instrument) exogvar1 exogvar2
ivreg2 depvar (endogvar = instrument) exogvar1 exogvar2Set panel/time series structure.
xtset panelvar timevar
tsset timevarARIMA modeling.
arima depvar, arima(p,d,q)ARCH/GARCH modeling.
arch depvar, arch(1) garch(1)Vector autoregression/error correction.
var depvar1 depvar2, lags(2)
vec depvar1 depvar2, lags(2)Newey-West regression.
newey depvar indepvar1 indepvar2, lag(2)Create scatter plots.
scatter yvar xvar [, options]Create histograms.
histogram var [, options]Create bar graphs.
graph bar var [, options]Create binned scatter plots.
binscatter yvar xvar [, options]Plot regression coefficients.
coefplot model1 model2 [, options]Create line graphs.
lgraph yvar xvar [groupvar] [, options]Format and export estimation results.
estout using filename.rtf
esttab using filename.rtfAdd statistics to stored estimates.
estadd local statname valueStore estimation results.
eststo name: commandExecute shell commands.
bash commandExecute a do-file.
do filename.doGenerate extended variables.
egen newvar = function(arguments)Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.