**Stata 17 highlights **

We are excited to introduce you to the new features in Stata 17. Below, we list some highlights of the release, and we tell you a little more about the first 13 of them.

1. Improved tables

2. Bayesian econometrics

3. Faster Stata

4. Difference-in-differences (DID) and DDD models

5. Interval-censored Cox model

6. Multivariate meta-analysis

7. Bayesian VAR models

8. Bayesian multilevel models

9. Treatment-effects lasso estimation

10. Galbraith plots

11. Leave-one-out meta-analysis

12. Bayesian longitudinal/panel-data models

13. Panel-data multinomial logit model

14. Zero-inflated ordered logit model

15. Nonparametric tests for trend

16. Bayesian dynamic forecasting

17. Bayesian IRF and FEVD analysis

18. BIC for lasso penalty selection

19. Lasso for clustered data

20. Bayesian linear and nonlinear DSGE models

21. Do-file Editor improvements

22. New functions for dates and times

23. Intel Math Kernel Library (MKL)

24. Stata on Apple Silicon

25. JDBC

26. Java integration

27. H2O integration

28. PyStata

29. Jupyter Notebook with Stata

1. Tables

Users have been asking us for better tables. Here they are. You can easily create tables that compare regression results or summary statistics, you can create styles and apply them to any table you build, and you can export your tables to MS Word®, PDF, HTML, LaTeX, MS Excel®, or Markdown and include them in reports. The table command is revamped. The new collect prefix collects as many results from as many commands as you want, builds tables, exports them to many formats, and more. You can also point-and-click to create tables using the new Tables Builder.

2. Bayesian econometrics

Stata does econometrics. And Stata does Bayesian statistics. Stata 17 now does Bayesian econometrics. Want to use probabilistic statements to answer economic questions, for example, Are those who participate in a job-training program more likely to stay employed for the next five years? Want to incorporate prior knowledge of an economic process? Stata’s new Bayesian econometrics features can help. Fit many Bayesian models such as cross-sectional, panel-data, multilevel, and time-series models. Compare models using Bayes factors. Obtain predictions and forecasts. And more! One of the appeals for using Bayesian methods in econometric modeling is to incorporate the external information about model parameters often available in practice. This information may come from historical data, or it may come naturally from the knowledge of an economic process. Either way, a Bayesian approach allows us to combine that external information with what we observe in the current data to form a more realistic view of the economic process of interest. Stata 17 offers several new features in the area of Bayesian econometrics: Bayesian VAR models Bayesian IRF and FEVD analysis Bayesian dynamic forecasting Bayesian longitudinal/panel-data models Bayesian linear and nonlinear DSGE models.

3. Faster Stata

Stata values accuracy and it values speed. There is often a tradeoff between the two, but Stata strives to give users the best of both worlds. In Stata 17, we updated the algorithms behind sort and collapse to make these commands faster. We also attained speed improvements for some estimation commands such as mixed, which fits multilevel mixed-effects models.

4. Difference-in-differences (DID) and DDD models

New estimation commands didregress and xtdidregress fit difference-in-differences (DID) and difference-in-difference-in-differences or triple-differences (DDD) models with repeated-measures data. didregress works with repeated-cross-sectional data, and xtdidregress works with longitudinal/panel data. DID and DDD models are used to estimate the average treatment effect on the treated (ATET) with repeated-measures data. A treatment effect can be an effect of a drug regimen on blood pressure or an effect of a training program on employment. Unlike with the standard cross-sectional analysis, available with the existing teffects command, DID analysis controls for group and time effects when estimating the ATET, where groups identify repeated measures. DDD analysis controls for additional group effects and their interactions with time—you can specify up to three group variables or two group variables and a time variable.

5. Interval-censored Cox model

A semiparametric Cox proportional hazards regression model is commonly used to analyze uncensored and right-censored event-time data. The new estimation command stintcox fits the Cox model to interval-censored event-time data. Interval-censoring occurs when the time to an event of interest, such as recurrence of cancer, is not directly observed but is known to lie within an interval. For example, the recurrence of cancer can be detected between periodic examinations, but the exact time of recurrence cannot be observed. We know only that cancer recurred sometime between the previous and current examinations. Ignoring interval-censoring may lead to incorrect (biased) results. Semiparametric estimation, when the baseline hazard function is left completely unspecified, of interval-censored event-time data is challenging because none of the event times are observed exactly. As such, "semiparametric" modeling of these data often resorted to using spline methods or piecewise-exponential models for the baseline hazard function. Genuine semiparametric modeling of interval-censored event-time data was not available until recent methodological advances, which are implemented in the stintcox command.

6. Multivariate meta-analysis

You want to analyze results from multiple studies. The studies report multiple effect sizes, which are likely to be correlated within a study. Separate meta-analyses, such as those using the existing meta command, will ignore the correlation. You can now use the new meta mvregress command to perform multivariate meta-analysis, which will account for the correlation.

7. Bayesian VAR models

The bayes prefix now supports the var command to fit Bayesian vector autoregressive (VAR) models. VAR models study relationships between multiple time series by including lags of outcome variables as model predictors. These models are known to have many parameters: with K outcome variables and p lags, there are at least p(K^2+\nn1) parameters. Reliable estimation of the model parameters can be challenging, especially with small datasets. Bayesian VAR models overcome these challenges by incorporating prior information about model parameters to stabilize parameter estimation.

8. Bayesian multilevel models: nonlinear, joint, SEM-like, and more

You can fit breadth of Bayesian multilevel models with the new elegant random-effects syntax of the bayesmh command. You can fit univariate linear and nonlinear multilevel models more easily. And you can now fit multivariate linear and nonlinear multilevel models! Think of growth linear and nonlinear multilevel models, joint longitudinal and survival-time models, SEM-type models, and more.

9. Treatment-effects lasso estimation

You use teffects to estimate treatment effects. You use lasso to control for many covariates. (And when we say many, we mean hundreds, thousands, or more!) You can now use telasso to estimate treatment effects and control for many covariates.

10. Galbraith plots

The new command meta galbraithplot produces Galbraith plots for a meta-analysis. These plots are useful for assessing heterogeneity of the studies and for detecting potential outliers. They are also used as an alternative to forest plots for summarizing meta-analysis results when there are many studies.

11. Leave-one-out meta-analysis

You can now perform leave-one-out meta-analysis by using the new option leaveoneout with meta summarize and meta forestplot. The leave-one-out meta-analysis performs multiple meta-analyses by excluding one study at each analysis. It is common for studies to produce exaggerated effect sizes, which may distort the overall results. The leave-one-out meta-analysis is useful to investigate the influence of each study on the overall effect-size estimate and to identify influential studies. See [META] meta summarize and [META] meta forestplot.

12. Bayesian longitudinal/panel-data models

You fit random-effects panel-data or longitudinal models by using xtreg for continuous outcomes, xtlogit or xtprobit for binary outcomes, xtologit or xtoprobit for ordinal outcomes, and more. In Stata 17, you can fit Bayesian versions of these models by simply prefixing them with bayes. See the full list of supported commands in [BAYES] Bayesian estimation under Panel-data models.

13. Panel-data multinomial logit model

Stata's new estimation command xtmlogit fits panel-data multinomial logit (MNL) models to categorical outcomes observed over time. Suppose that we have data on choices of restaurants from individuals collected over several weeks. Restaurant choices are categorical outcomes that have no natural ordering, so we could use the existing mlogit command (with cluster–robust standard errors). But xtmlogit models individual characteristics directly and thus may produce more efficient results. And it can properly account for characteristics that might be correlated with covariates.

**And more! **