Home  /  Products  /  Stata 16  /  Added features

This page announced the new features in Stata 16. Please see our Stata 18 page for the new features in Stata 18.

Free updates to Stata 16

Many new features were introduced in Stata 16. But did you know we continuously add new features between releases? Below, simply expand each section for descriptions on the new features we've added since the release of Stata 16.

    • The Do-file Editor has many new enhancements to simplify your coding experience. For instance, you can control auto indentation of lines between curly braces, use Alt + the Up or Down arrow to shift selected lines up or down, respectively, and wrap selected text in quotes or parentheses. New keyboard shortcuts have been added for toggling code folding. Code folding is also now available for multiline comments.
    • New date and time functions make working with dates easier. You can now easily calculate an age, a difference in two times, and a difference in two dates. You can request the date of birth in a given year, and you can ask for the previous or next birthday. In addition, you can also determine whether a given year is a leap year and ask for the previous or next leap year.
    • ICD-10-CM diagnosis codes and ICD-10-PCS procedure codes have been updated for the 2021 fiscal year.
    • You now have more flexibility when creating a data frame containing a subset of an existing dataset. frame put now allows you to specify both a subset of variables and a subset of observations to be included in the new frame.
    • When creating a Word document with putdocx, you can now specify page margins for the entire document and for sections within the document.
    • Reports in Word documents can be further customized. Hyperlinks can now be inserted into tables and text. In addition, the putdocx textblock command, which allows you to insert large blocks of text, now allows more control over paragraph spacing and line wrapping.
    • After you create a Word document using putdocx or a PDF file using putpdf, a clickable link is now provided, which allows you to easily open the new document.
    • Need larger graphs? graph's xsize() and ysize() options now allow you to set the height and width up to 100 inches (254 centimeters). What's more, you can now specify these sizes in inches, centimeters, or printer points.
    • You can now export graphs to .png and .jpg formats when running console Stata, which means you can export to these graph formats using any flavor of Stata running on any platform.
    • Do you use nestreg or stepwise for variable selection? These commands now allow factor variables for including categorical variables and interactions in your model. So, if you type, for instance,

      . regress y x1 x2 i.x3 c.x2#i.x3 x4 x5

      to include all variables in your model, you can now type

      . nestreg: regress y (x1 x2) (i.x3) (c.x2#i.x3) (x4 x5)

      to fit and compare nested models. The stepwise prefix can be used similarly for stepwise estimation with factor-variable notation.
    • Creation of a new variable containing a count, minimum, maximum, mean, standard deviation, mean absolute deviation, skewness, kurtosis, percentage of the total, or group identifiers by using the egen command is now faster.
    • You can now easily create a new variable containing group-specific standard deviation of another variable by using the egen std() function with the by prefix.
    • When you perform a test of incidence-rate difference for unstratified data, the ir command now provides the exact option, which reports exact p-values without a mid-p correction. These exact p-values are more conservative than the mid-p-adjusted values.
    • Forest plots and meta-analysis summaries can now report effect sizes and confidence intervals in transformed metrics that make results easier to interpret. For instance, for a meta-analysis performed using Fisher's z values, effect sizes and confidence intervals can be transformed and reported as correlations. Likewise, log risk-ratios can be transformed to treatment efficacies, log odds-ratios to odds ratios, log hazard-ratios to hazard ratios, logits of proportions to proportions, and more.
    • Forest plots for meta-analysis have many new customization features. For instance, you can now insert vertical lines for the overall effect size and no effect size, include variables from your dataset in the plot, add a prediction interval, include multiple estimates of the overall effect size, and suppress the row corresponding to the overall effect size.
    • Knapp–Hartung adjustments can now be applied with subgroup meta-analysis and cumulative analysis when creating meta-analysis summaries or forest plots.
    • Meta-analysis summaries can now be sorted based on the values of variables in your dataset.
    • Multilevel models now have a more convenient syntax for including random coefficients on interactions, squared terms, and indicators for levels of categorical variables. Stata's standard factor-variable notation can now be used in the random-effects equations for multilevel mixed-effects commands, such as mixed, melogit, mepoisson, and mestreg. Stata's meologit, meoprobit, and mecloglog commands fit multilevel ordinal logit, ordinal probit, and complementary log-log models respectively. You can now use estat icc to estimate intraclass correlations after each of these commands.
    • Multilevel logit and Poisson models offer two new methods for numerical integration that can speed up computations dramatically for models with many levels, especially when random slopes are included.
    • Mixed logit models are now easier to interpret. The new or option allowed with cmmixlogit and cmxtmixlogit reports results as odds ratios for alternative-specific variables and as relative-risk ratios for case-specific variables.
    • Computing expected probabilities, marginal effects, and other marginal values after fitting conditional logit, multinomial probit, and mixed logit models is now much faster.
    • Panel-data random-effects linear models fit via maximum likelihood estimation now allow robust and cluster–robust standard errors.
    • When you list the survivor, failure, or cumulative hazard function with sts list, the number at risk can now be reported for the times specified in the new risktable(numlist) option. In addition, you can now use the tmin() and tmax() options to restrict the minimum and maximum ranges of observed times when reporting the survivor or other functions and when computing survival-time summaries.
    • When you list, graph, or create new variables containing the survivor or other functions using sts graph, sts list, or sts generate, you can now more easily adjust for specific covariate values with the new adjustfor() option. Within this option, you can specify exact values of covariates, or you can request that covariates be set to their group means, overall means, medians, minimums, maximums, or a variety of other statistics. This new option also allows you to specify values for factor variables, setting them to base categories, the means of the factor indicators, or to specific factor levels.
    • When you create a "log-log" plot to assess the proportional-hazards assumption with stphplot, you can use the new option adjustfor() to more easily adjust for specific covariate values. Within this option, you can specify exact values of covariates, or you can request that covariates be set to their group means, overall means, medians, minimums, maximums, or a variety of other statistics. This new option also allows you to specify values for factor variables, setting them to base categories, the means of the factor indicators, or to specific factor levels.
    • When you plot the survivor or other functions using stcurve after fitting a model, you can now more easily set covariates to specific values using the at() and at#() options. In addition, you can now plot up to 20 curves.
    • After fitting a Cox proportional hazards model or parametric survival model—including those for interval-censored data, panel data, or multilevel data—you can now plot the failure function using stcurve's new failure option.
    • You can now generate new variables containing an estimate of failure function, its standard error, and the lower and upper bounds of its confidence interval using sts generate.

Download the new features

Ready to use one of these new features? Want to find out what other changes we made? If you already have Stata 16, type

. update all

in your copy of Stata 16 to download the new features. Then, type

. help whatsnew

to see a list of all the new features added in free updates since Stata 16 was released.