Start with the task you need
- Open data: view a .dta dataset or import a CSV file.
- Prepare variables: create a column, change selected values, or calculate row and group summaries.
- Summarize data: use summarize, frequency tables, or tables of selected statistics.
- Analyze relationships: fit a linear regression, fit a logistic regression, or compare means with a t-test.
Each manual explains the command, available options, and a complete example with data.
Try a linear regression
This short script loads student-score data and fits a linear regression for mathematics scores. Open it in the browser and click Run. The dataset is included, and no sign-in is needed.
clear
import delimited "data/student_scores.csv"
regress math female i.race, robust
Sample data included. Opens in a new tab; click Run.
math is the outcome. female is entered as a numeric predictor; i.race treats the race codes as categories. The robust option requests heteroskedasticity-robust standard errors.
The output reports coefficients and uncertainty for the fitted relationships. A category coefficient compares that category with the omitted reference category, holding the other predictors fixed. See the regress manual to interpret the table and change the model.
Adapt an existing analysis
- Upload your
.doscript and input datasets using Upload Files in the Files panel. - Open the script and update its data paths to match the files in the workspace.
- Check the manuals for the commands and options used by your analysis, then click Run.
- Compare observation counts, variable definitions, and the main results with the analysis you are reproducing.
stats.camp is a separate implementation, not a hosted copy of Stata. A do-file that depends on an installed Stata add-on needs a supported equivalent here. The do-file guide explains opening scripts, resolving file paths, and saving commands.
Save and organize your work
In the public example, save commands with the disk icon labelled Save commands as .do file. Right-click the saved file in Files and choose Download to keep a copy. This workspace does not sync your changes to GitHub.
For a project that syncs across devices, sign in with GitHub and choose New project. Enter a project name, then open it from the Projects list. This creates a private GitHub repository; files in that project can sync to GitHub.