Course modules
18 modules over 10 daysParticipants can organise a reproducible Stata project for machine learning analysis.
- Stata data types, storage formats, and missing-value conventions
- Do-files, log files, version control, and reproducible project folders
- Importing CSV, Excel, and database extracts with import commands
- Variable labels, value labels, formats, and codebook documentation
- Audit trails linking source data, transformations, and analytical outputs
- Financial and economic data confidentiality, access controls, and disclosure risk
Participants can prepare an analysis-ready dataset while preserving source-data traceability.
- Duplicate detection using isid, duplicates, and key-variable checks
- Missing-data patterns assessed with misstable summarize and tabulation
- Outlier investigation using percentiles, box plots, and domain thresholds
- Date and time variables converted into consistent Stata formats
- Merging panel, transaction, and reference files using documented identifiers
- Training dataset construction with explicit target, predictors, and observation windows
Participants can define a prediction problem and select an appropriate validation design.
- Continuous, binary, count, and time-to-event prediction targets
- Prediction objectives distinguished from causal estimation and policy evaluation
- Target leakage identified through timing, availability, and outcome contamination
- Training, validation, and test samples assigned using reproducible seeds
- Temporal splits designed for forecasting and changing economic conditions
- Unit-of-analysis choices for customers, loans, firms, and transactions
Participants can use exploratory analysis to identify usable predictors and data risks.
- Distribution checks using summarize, detail, histogram, and kdensity
- Categorical predictors inspected with tabulate, proportions, and sparse-cell counts
- Pairwise associations assessed with correlations, cross-tabs, and scatterplots
- Outcome prevalence examined before binary classification model selection
- Panel structure diagnosed with xtset, gaps, and repeated observations
- Economic plausibility checks applied to predictors, targets, and timestamps
Participants can create documented features suitable for regularised prediction models.
- Factor-variable notation creating categorical effects and interaction terms
- Logarithmic, ratio, growth, and difference transformations for skewed variables
- Lagged and rolling features constructed from panel and time-series data
- Binning continuous predictors using policy thresholds and quantile cut-points
- One-hot encoding choices assessed against reference-category specifications
- Feature dictionaries recording definitions, timing, source fields, and rationale
Participants can establish transparent benchmark models before applying machine learning methods.
- Ordinary least squares benchmarks estimated with regress and factor variables
- Binary outcome benchmarks estimated using logit and logistic commands
- Count outcome benchmarks estimated with poisson and negative binomial models
- Naive forecasting benchmarks based on persistence, averages, and seasonal patterns
- In-sample fit separated from out-of-sample predictive performance
- Benchmark documentation recording sample definitions, variables, and assumptions
Participants can explain and estimate lasso models for high-dimensional predictor sets.
- Overfitting, variance, bias, and shrinkage in predictive modelling
- L1 penalty mechanics and coefficient selection under lasso estimation
- L2 penalty mechanics and coefficient shrinkage under ridge regression
- Penalty parameter lambda selected through cross-validation procedures
- Standardisation effects considered before comparing penalised coefficient estimates
- Sparse models interpreted without treating selection as causal proof
Participants can estimate, tune and interpret lasso linear prediction models in Stata.
- Lasso linear fitted with lasso linear for continuous outcomes
- Selection plots used to inspect coefficients across penalty values
- Cross-validation folds configured for stable penalty parameter selection
- Postestimation predictions generated for validation and test observations
- Root mean squared error compared across competing regression models
- Residual diagnostics reviewed for systematic prediction errors and extremes
Participants can use elastic net when predictor correlation affects lasso variable selection.
- Elastic-net penalties combine lasso selection with ridge shrinkage
- Alpha values compared across correlated financial and economic predictors
- Elasticnet linear estimated using candidate alpha and lambda grids
- Grouped predictors assessed for stability across resampled training datasets
- Coefficient paths reviewed before selecting the final penalty specification
- Model parsimony balanced against predictive accuracy and interpretability requirements
Participants can develop lasso logistic models for binary risk and event predictions.
- Lasso logit estimated for default, fraud, churn, and event outcomes
- Predicted probabilities generated using predict after model estimation
- Classification thresholds selected from decision costs and operational capacity
- Confusion matrices calculated for true positives, false positives, and errors
- Sensitivity, specificity, precision, and recall compared across thresholds
- Class imbalance addressed through sampling decisions and appropriate performance metrics
Participants can assess discrimination and probability calibration for classification models.
- Receiver operating characteristic curves plotted across classification thresholds
- Area under the curve interpreted as ranking discrimination
- Precision-recall curves applied to rare-event classification problems
- Calibration plots compare predicted probabilities against observed event rates
- Brier scores measure probability forecast accuracy and calibration
- Decile lift tables identify concentrated risk and intervention segments
Participants can select suitable machine learning approaches for count and nonlinear outcomes.
- Lasso poisson fitted for claims, transactions, incidents, and visits
- Exposure offsets incorporated into count models with differing observation periods
- Zero inflation assessed before interpreting sparse count prediction results
- Nonlinear terms specified with splines, polynomials, and interaction features
- Generalised linear model benchmarks compared with penalised count specifications
- Prediction intervals discussed separately from point-prediction accuracy measures
Participants can design validation procedures that provide credible performance estimates.
- K-fold cross-validation estimates average performance across resampled partitions
- Repeated cross-validation reduces dependence on a single random split
- Bootstrap resampling estimates uncertainty in model performance statistics
- Grouped folds prevent related customers or firms crossing sample boundaries
- Time-series validation preserves information timing and forecast origin
- Nested validation separates hyperparameter tuning from final performance assessment
Participants can assess tree-based models alongside regularised regression models.
- Decision trees partition observations using recursive binary splitting rules
- Tree depth, minimum nodes, and pruning control model complexity
- Random forest principles compared with single-tree prediction behaviour
- Stata-compatible community packages assessed for installation and reproducibility
- Variable importance measures interpreted cautiously with correlated predictors
- Lasso and tree-based results compared using identical test samples
Participants can distinguish predictive modelling from high-dimensional causal estimation.
- Predictive accuracy differs from unbiased treatment-effect estimation objectives
- Double-selection lasso identifies controls for treatment-effect regression models
- Dsregress estimates treatment effects with high-dimensional candidate controls
- Partialling-out methods reduce regularisation bias in causal coefficient estimation
- Confounder timing assessed before specifying treatment and control variables
- Causal claims limited by design, identification assumptions, and data quality
Participants can communicate model outputs, limitations and recommended actions to stakeholders.
- Prediction drivers communicated without overstating causal interpretation or importance
- Partial dependence concepts explained for nonlinear predictor-response relationships
- Segment-level performance reviewed by portfolio, geography, and customer category
- Error analysis identifies cases requiring manual review or additional data
- Decision thresholds linked to costs, benefits, capacity, and risk appetite
- Executive model summaries present purpose, performance, limitations, and actions
Participants can prepare a governance and monitoring plan for a Stata prediction model.
- Model inventory entries record owner, purpose, data, method, and usage
- Validation reports document sample design, metrics, results, and limitations
- Data drift monitored through distributions, missingness, and population stability
- Performance drift tracked using realised outcomes and scheduled recalibration reviews
- Change-control procedures govern data, code, threshold, and model revisions
- Deployment plans specify scoring frequency, outputs, users, and escalation routes
Participants can build, review and present a complete documented Stata machine learning analysis for a business or policy prediction problem.
- Business prediction question framed with target, decision, and success metric
- Analytical dataset prepared with documented transformations and feature definitions
- Baseline and regularised models estimated using reproducible Stata do-files
- Validation evidence compares predictive accuracy, calibration, and operational thresholds
- Model-risk review records limitations, drift indicators, and governance controls
- Stakeholder presentation recommends model use, monitoring, and next implementation steps
Exercises and examples are adapted to each cohort's sectors and roles.








