
Master regression in Stata through intuitive, no-equation lessons, covering linear (OLS) and nonlinear (logit) models, practical data examples, and tips on functional form, interactions, and collinearity.
Explore linear regression concepts in Stata through an intuitive, equation-free approach for beginners. Learn to apply and interpret statistical results with no prior knowledge required.
Master linear regression through ordinary least squares (OLS), the most common regression method, used to relate a single continuous variable to multiple continuous or categorical predictors.
Learn to use Stata to demonstrate ordinary least squares regression and interpret the output, using do files and the auto training data set.
Understand regression analysis by linking a dependent variable y to independent variables X with an error term, while recognizing data types and that log transformations can change interpretation.
Explore linear regression and the ordinary least squares method, modeling a linear relationship between a continuous dependent variable and explanatory variables. Differentiate simple regression from multiple regression.
Explore the core regression methods, from ordinary least squares for continuous, cross-sectional data to nonlinear logit and probit, ordered and multinomial variants, and time-based panel, count, and Cox models.
Explore how regression works by using visual aids to link X and Y through correlation, highlighting how data points, scatter plots, and noise reveal relationships and their changing strength.
Explore lines of best fit using parametric and non-parametric methods, from local polynomial regression to linear and quadratic forms, and extend to the plane of best fit in multidimensional data.
Explore how regression analysis reveals relationships in data while distinguishing causality from correlation, and learn how time elements and theoretical reasoning influence causal inferences in different settings.
Explain ordinary least squares, a regression method that fits a line of best fit by minimizing the sum of squared residuals to avoid cancellation.
See how ordinary least squares fit the line of best fit by minimizing squared residuals and RMSE, revealing the beta slope that links Y (car price) to X (mileage).
Explore how Stata displays regression output, focusing on coefficients and the role of standard errors, t statistics, p values, confidence intervals, and R squared in assessing fit.
Explain the sum of squares—explained, residual, and total—and how R-squared and adjusted R-squared quantify model fit; show how noise alters R-squared even when the underlying relationship remains the same.
Explore the best linear unbiased estimator under Gauss–Markov assumptions, compare efficient and inefficient ordinary least squares estimators, and understand unbiasedness and the role of standard errors.
Explore the Gauss-Markov assumptions that ensure ordinary least squares is efficient and unbiased, including homoskedasticity, no perfect collinearity, linear in parameters, and zero conditional mean (exogeneity).
Explain how the homoskedasticity assumption keeps residual variance stable and why violations affect hypothesis testing, and show how robust standard errors mitigate this issue.
Demonstrates how no perfect collinearity ensures unique coefficient estimates, explains multicollinearity's impact on standard errors, and shows how to test and mitigate it through variable transformation or exclusion.
Explain how regression models can be linear in parameters while using non-linear transformations like polynomials and interactions to improve fit, illustrated with residuals and a quadratic example.
Explore the zero conditional mean exogeneity assumption, ensuring no correlation between x and the error term to prevent bias in ols estimates and endogeneity.
Test and correct for endogeneity by improving data quality and model building, exploring different functional forms, and guarding against data mining that undermines exogeneity and biases ordinary least squares results.
Review the Gauss-Markov assumptions, including linear in parameters and the zero conditional mean exogeneity, and learn how collinearity and heteroskedasticity affect standard errors and when to use robust standard errors.
Before you run the code: this lecture uses the user-written command esttab (part of the estout package). Install it once in Stata with:
ssc install estout, replace
After that, the code in the resources runs as shown in the video.
Explore nonlinear regression through easy statistics in Stata, focusing on intuitive concepts, practical interpretation, and application with minimal equations for learners with no prior background.
Explore nonlinear regression and its focus on nonlinear parameters, examine logit and probit models, and understand non-continuous dependent variables across social sciences.
Use Stata to demonstrate data interpretation by examining output from examples, and access attached code files and downloadable training data to replicate the analysis.
Explore nonlinear regression analysis as an extension of linear regression, where the dependent variable relates to one or more independent variables across continuous, integer, binary, ordinal, and nominal data.
Explore how nonlinear regression models relate parameters to the dependent variable in non-linear ways. Learn to transform nonlinear regression coefficients into meaningful measures using marginal effects computation.
Discover how nonlinear regression provides quantitative evidence, enables hypothesis testing, and predicts outcomes while controlling for other factors. It avoids out-of-bounds predictions for binary or time-to-event data with nonlinear transformations.
Explore nonlinear regression models in Stata, including logit and probit for binary outcomes, ordered logit/probit with cut points, multinomial logit, and Poisson or Cox models for count and time data.
Explore the linear probability model, an ordinary least squares approach to binary outcomes, its limitations, heteroskedasticity, robust standard errors, and its relation to logit or probit models.
Use logit or probit transformations to create nonlinear models that bound Y between 0 and 1, producing similar logit and probit fits for reliable predictions.
Explore how latent variables underlie nonlinear models like logit and probit, illustrating the unseen y star and the observed outcome. Learn how to interpret coefficients via marginal effects.
Discover marginal effects as slope or partial effects in linear and nonlinear regressions, computed at mean x, showing how a unit change in x shifts Y's probability of being one.
Examine how dummy explanatory variables shift the nonlinear y–x relationship in regression. Observe that the intercept effect of a 0/1 dummy varies with x under a logistic transformation.
Explain multiple nonlinear regression with several continuous predictors and a dummy variable, highlighting how each beta depends on all x-values, and compare logit versus linear model fits.
Assess goodness of fit for nonlinear models like logit and probit by comparing full and null models with log-likelihood, using pseudo R-squared and classification tables, and noting cut-point effects.
Explain how logit coefficients relate to log odds and how exponentiating them yields odds ratios, while noting that odds hide the probability magnitude and marginal effects reveal it.
Explore logit and probit regression, including robustness to small samples, comparable predictions and marginal effects, and practical options like reporting average marginal effects or using a linear probability model.
Explore how the linear probability model can mirror marginal effects from logit and probit, and compare its slope estimates to OLS in binary outcomes.
Before you run the code: this lecture uses the user-written command esttab (part of the estout package). Install it once in Stata with:
ssc install estout, replace
After that, the code in the resources runs as shown in the video.
Explore regression modeling with intuitive concepts, focusing on interpretation and transferable skills across methods. Observe practical demonstrations in Stata, emphasize application over equations, and learn to build better models.
Focus on thoughtful planning, theory-driven explanatory modeling, and careful variable selection before regression; balance prediction and explanation with iterative checks, sensitivity analyses, and data quality considerations in Stata.
Explore how linear regression can model non-linear relationships by adding polynomial terms, testing functional form, and interpreting coefficients, with examples like age-related U-shaped and quadratic effects.
Explore functional form in regression with stata by modeling hourly pay as a function of age and schooling, then quadratic and cubic terms, and assess multicollinearity with vif.
Explore how interaction effects in regression models reveal differing trends across groups, including continuous by continuous, categorical by continuous, and categorical by categorical interactions in Stata.
Explore interaction effects in regression with Stata, including continuous and categorical interactions, margins plots, and visualizing how mileage, foreign status, weight, and repair influence car prices.
Explore how to incorporate time information into regression models, including long and wide data forms, time trends, lags, leads, and finite distributed lag models, with practical Stata examples.
Explore analyzing log hourly wages with longitudinal panel data in stata, using long format and unbalanced samples, time-aware regressions, and distributed lag models to reveal dynamic effects.
Learn to code and interpret categorical explanatory variables in regression using dummy variables, reference categories, intercept shifts, and group tests, with practical examples in Stata.
In Stata, convert the categorical Rep 78 into dummy variables, run regressions with miles per gallon, and assess reference category effects and group significance via margins.
Explore how multicollinearity inflates standard errors and degrades regression estimates as perfect and imperfect collinearity emerge. Identify warning signs and remedies, including variance inflation factor, variable exclusion, and centering.
Explore multicollinearity in regression with Stata by examining pairwise correlations, assessing VIF, and using backward selection, PCA, or demeaning to stabilize coefficients.
Before you run the code: this lecture uses the user-written command esttab (part of the estout package). Install it once in Stata with:
ssc install estout, replace
After that, the code in the resources runs as shown in the video.
Code for this lecture: the do-file is attached to the previous lecture, Dealing with Missing Values - Seeing the Unseeable (4-code.do). It uses esttab, so install it once with ssc install estout, replace.
Explore Stata, a versatile statistical software for data management and analysis, including file handling, merging, and manipulation. It offers wide statistical options, graphing, and multi-core processing.
Open the Stata interface and explore the results, command, variable, and properties windows, then customize layouts, menus, and preferences using the set command.
Explore stata's help features by using the help command, the help menu, and online resources to access the PDF manual, getting started guides, and the Stata Journal.
Explore Stata command syntax and how it structures interactions beyond the graphical interface. Learn by prefix, variable list, expression, if, in, weights, and options, plus help and regress shortcuts.
Explore do files and ado files in Stata, including how to create, edit, and execute do files, and why this modular coding supports reproducible data analysis.
Start and manage log files in Stata to record your data sessions, view and amend logs, append or replace them, and translate logs to plain text for editors.
Learn to load and import data in Stata with clear, use, system use, and import, and import Excel data with first row variable names and sheet option.
View raw data in Stata with Browse and Edit, inspect data via the data editor, filter with if and in, and view the first ten observations.
Explore basic descriptive statistics in Stata using describe, summarize, and codebook to quickly understand a 1978 automobile dataset with 74 observations and 12 variables.
Explore how missing values are coded as full stops in Stata and treated as positive infinity, and learn to identify, recode, and analyze them with ms table, summarize, and encode/decode.
Master tabulate in Stata to create one- and two-way tables for categorical variables, use missing and no label options, and preview statistics with the summarize option and tab stat.
Analyze distributional statistics for a continuous variable using inspect, stem, and summarize detail to reveal shape, skew, and tails, then test normality with skewness and kurtosis on price data.
In Stata, apply frequency, sampling, analytical, and importance weights to adjust survey data toward population totals, and learn bracket syntax for weighted descriptive stats, regressions, and graphs.
Explore the new Stata 17 table command to build custom two-way tables, compute descriptive, frequency, and summary statistics, and export results to Excel, PDF, or Latex.
Generate new variables in Stata by combining variables or applying functions, such as price divided by weight or log price, using generate and replace commands.
Explore renaming single or grouped variables, changing variable labels, and creating value labels in Stata using rename and label commands, with a quick tour of the variables manager.
Explore extensions to generate in Stata with Egon to create complex variables, including standard deviation, cut into deciles, and row means across price, miles per gallon, and weight.
Learn to create indicator variables in Stata with generate, replace, or recode, using else rules and tabulate, and utilize auto code and enlist for efficient categorization.
Master keep and drop in Stata to retain or remove observations and variables, using if conditions and wildcards. Always work on a copy, since there is no back button.
Learn to save Stata datasets safely by using cd and save, avoid overwriting with replace, and export to formats like Excel, always working on a copy.
Convert string variables to numeric in Stata using d string and two string, and reverse with encode and decode to handle non-numeric characters and missing values.
Learn how to combine data sets in Stata by appending observations and merging variables using a merge key or ID variable, including 1 to 1 and other merge types.
Master macros and loops in Stata to shorten code and automate tasks. Learn local and global macros, and foreach loops to efficiently generate and summarize multiple variables.
Access stored results from Stata commands, use return lists for r-class and e-class outputs, and retrieve coefficients and standard errors via underscore system variables.
Explore double loops in Stata that multiply each variable by iterative factors to generate many new variables, speeding repetitive data manipulation shown with the auto data.
Learn to handle date information in Stata by converting string dates to numeric, handling varied formats (mdy, dmy, ymd), combining separate year, month, day fields, and formatting for analysis.
Learn to analyze data across groups in Stata by using underscore variables, subscripts, and the by prefix or bysort, generating new variables and extracting group max or min.
Master visual data presentation in Stata by using the graph command and its subcommands to overlay graphs with two way, save and edit, and apply economist scheme.
Learn to create bar graphs and dot charts in Stata, compare frequencies across categories, and interpret summary statistics such as the average price and its standard deviation.
Explore how to graph distributions in Stata with histogram, kernel density, quantile plots, and box plots, and see how bin width, bandwidth, and glider transforms reveal skewness and outliers.
Create pie charts in Stata via the graphical user interface and the graph pie command. Explore categorical data, customize slices, include missing values, and compare domestic and foreign cars.
Explore scatter plots and lines of best fit to visualize relationships between two variables, assess linear and non-linear forms, and overlay fitted plots using the two way command in Stata.
Learn to graph custom functions in Stata with the two way function command, plotting sine waves, quadratics, and logistic curves over chosen x ranges, including regression coefficients.
Contour plots visualize a third dimension in two dimensions, useful for bivariate distributions and continuous by continuous interactions; build with two way contour in Stata using levels and margins.
Explore the jitter option in Stata scatter plots, applying random spherical noise to reveal data patterns, anonymize confidential values, and illustrate relationships like price versus miles per gallon.
Learn how sunflower plots in Stata visualize two-variable density, using hexagons and petals to show high, medium, and low density and revealing structure in large data distributions.
Learn to merge multiple graphs into a single Stata figure using graph combine, storing graphs in status memory and applying options like y common, x common, and alt shrink.
Adjust Stata graphs by changing aspect ratio, y size, and x size to fit the plot region or entire graph, and scale text and markers as needed.
Learn to graph by groups in Stata using the buy option to repeat graphs across subgroups, with i scale, total, missing, row and column, and compact options.
Learn to change graph colors in Stata using scheme options and object-specific color controls, including opacity, intensity, and RGB values, with scatter plot examples.
Add markers and custom text to Stata graphs using starter code, including titles, labels, and Greek letters, with bold and italic formatting via Smiggle.
learn to create category-based scatter plots in Stata by using the separate and overlay techniques, and to generate and plot mean statistics with collapse across groups.
Explore how to test relationships between two categorical variables in Stata with two-way tabulations, chi square, and fisher exact tests using the auto data.
Learn to test means in Stata using one-sample and two-sample t tests, assess standard deviations and proportions, and compare multiple groups with Hotelling's t-squared and mean by visuals.
Explore pearson's correlation, bivariate relationships for continuous and binary variables, compare correlate and pairwise correlate, inspect listwise and pairwise deletion, p value, covariances, and tetrachoric options.
Explore one-way and two-way anova in Stata to test mean differences across groups, check equal variances with Bartlett's test, and inspect regression coefficients after anova.
Explore ordinary least squares regression in Stata using the regress command, interpreting coefficients, significance, and model fit with car price as the outcome.
Use the i dot prefix to treat categorical variables as factor variables in OLS regression, expanding them. Change the base category with the ib prefix to set the reference.
Explore Stata's diagnostic tools for ordinary least squares regression, including post estimation statistics, diagnostic plots, multicollinearity checks, outlier detection, and heteroskedasticity tests.
Transform and model car prices in Stata to improve fit by applying log transformation, adding a quadratic relation with miles per gallon, and using margins plots to visualize interactions.
Perform after-regression hypothesis tests in Stata, including single and joint tests, comparing coefficients, using the test and testparm commands, and calculating linear combinations to assess total effects.
Learn to store, replay, and present OLS regression estimates in Stata with estimate store and estimates table, creating triangular output tables, and export to Word or Excel using user-written commands.
Explore standardized regression coefficients (beta) to compare variable effects by standardizing to mean zero and a standard deviation of one, using Stata beta or std beta, with cautions for interactions.
Visualize regression estimates in Stata with margins and coef plot, plotting coefficients and confidence intervals from stored results to compare multiple models.
Explore Oaxaca decomposition analysis to separate the gender pay gap into explained by education and experience and unexplained discrimination, using Stata's Oaxaca command and twofold or pooled options.
Explore linear mixed effects models with random intercepts and random slopes, using Stata mix or xtmixed to capture unit-specific variation and improve fit.
Correction: to constrain all three slopes (mpg, weight and length) to be equal, use both constraints:
cnsreg price mpg weight length i.rep78, constraints(1 2)
constraints(2) on its own only makes the mpg and length slopes equal.
Four courses in one: understand regression, then use it in Stata.
The STATA OMNIBUS brings four of my courses together in one place. Parts 1 to 3 explain regression in plain English, without equations, so you understand what your results actually mean. Part 4 is The Essential Guide to Stata, where you learn Stata hands-on, from importing data to panel data, survival analysis and instrumental variables.
That is about 19 hours of video in 160 lectures, with do-files, datasets and slides to follow along, a quiz at the end of each Stata section, and a practice test at the end.
What you will learn
Part 1: Linear Regression. What regression is and why it is useful, lines of best fit, correlation versus causation, Ordinary Least Squares, sums of squares, and the Gauss-Markov assumptions and what happens when they fail. Each idea is followed by applied examples in Stata.
Part 2: Non-Linear Regression. Why we need non-linear models, maximum likelihood, the linear probability model, logit and probit, latent variables, marginal effects, odds ratios and goodness of fit, again with applied examples in Stata.
Part 3: Regression Modelling. The practical decisions behind a good model: functional form, interaction effects, using time, categorical explanatory variables, multicollinearity and missing data. Each topic has a short theory lecture followed by a Stata session.
Part 4: The Essential Guide to Stata.
How the course is taught
Concepts first, in plain English and with almost no equations. Then the same ideas in Stata, with real output and how to interpret it. Most examples use datasets that come with Stata, so you can follow along straight away. Where a lecture uses its own data or a free add-on command, the files are attached and the lecture notes explain what to install.
How to use it
New to regression? Start at the beginning. Mainly want to learn Stata? Go straight to Part 4 and come back to Parts 1 to 3 whenever you want to understand what the output means.
Who this course is for
Students and researchers in economics, the social sciences, health, business and policy who work with data, and professionals who use quantitative evidence and want to run and interpret regressions in Stata with confidence. No prior knowledge of statistics is needed.