Straight from development to you. With StataNow, you always have the latest features.

```
___ ____ ____ ____ ____(R)
/__ / ____/ / ____/
___/ / /___/ / /___/
Statistics/Data analysis
Title
Additions to Stata since release 18.0
Description
Update history:
Stata 18.0 base 25apr2023
updated to 30apr2024
StataNow 18.5 30apr2024
This file records the additions and fixes made to Stata since the initial
release of version 18.0. See What's new table of contents for changes in
other Stata versions.
Updates are available for free over the Internet. Updates and items
available only in StataNow are marked as such. Click here to obtain the
latest update, or see updates for detailed instructions.
The most recent changes are listed first.
-------- update 30apr2024 (StataNow version 18.5) -----------------------------
Introducing StataNow.
What is StataNow? First and foremost, StataNow is Stata. It is a
continuous-release version of Stata that offers new features as soon as
they are ready. StataNow is the result of our ongoing effort to deliver
the best Stata -- the most current Stata -- to our users.
Before StataNow, most new features became available only at the time of
a major release such as Stata 17, Stata 18, and so on. StataNow
provides access to new features sooner. For instance, StataNow contains
features that will also be part of a future major release, Stata 19. As
always, all versions of Stata are updated regularly with any corrections
and necessary improvements. The first 11 features introduced in
StataNow are listed below.
You can learn more about StataNow at stata.com/statanow.
1. (StataNow) High-dimensional fixed effects (HDFE). You can now absorb
not just one, but multiple high-dimensional categorical variables in
your linear and fixed-effects linear models. This provides
remarkable speed gains over the traditional approach that includes
indicators for all categories of these variables in your models.
Commands areg and xtreg, fe now allow option absorb() to be specified
with multiple categorical variables. Previously, areg allowed only
one variable in option absorb(), while xtreg, fe did not allow the
option.
Results are adjusted to control for the variables specified in
absorb(varlist), but the coefficients on varlist are not estimated,
and therefore, computation time is substantially reduced. The time
savings are extraordinary when high-dimensional categorical variables
are absorbed.
For example, say we have repeated cross-sectional data for 10,000
individuals, for 20 years, across 3,000 counties, and who work in
1,000 industries. We would like to see how their work satisfaction
is affected by commuting time. Previously, we would fit the model
including year, county, and industry indicators as follows:
. areg satisfaction commute i.(year county industry), absorb(id)
We care about the coefficient on commute. All other variables are
controls. Yet, fitting the model above implies estimating about
4,000 coefficients while adjusting for id. This could take minutes.
Instead, we can type
. areg satisfaction commute, absorb(id year county industry)
The command above takes seconds, and we estimate only the parameter
that matters to our research question.
Learn more at stata.com/statanow/high-dimensional-fixed-effects.
2. (StataNow) Bayesian quantile regression. Prefix command bayes: now
supports command qreg for fitting Bayesian quantile regression.
Bayesian quantile regression assumes an asymmetric Laplace
distribution for the likelihood function and combines it with priors
for model parameters to form a posterior model for comprehensive
Bayesian inference.
bayes: qreg seamlessly integrates with Bayesian postestimation
commands so that you can easily perform hypothesis testing and
predictive analyses.
Learn more at stata.com/statanow/bayesian-quantile-regression.
3. (StataNow) SVAR via instrumental variables. New estimation command
ivsvar fits structural vector autoregressive (SVAR) models via
instrumental variables. Instrumental-variables SVAR models, also
called proxy SVAR models, are an alternative to short-run SVAR models
fit by svar. Because shocks of interest, the target shocks, are
modeled using instrumental variables, these models require fewer
constraints to identify the structural impulse-response functions
(IRFs) than are required by the models fit by svar.
ivsvar provides two estimators: a generalized method of moments (GMM)
estimator and a minimum distance estimator. The GMM estimator allows
any number of instruments to proxy for one target shock. The minimum
distance estimator allows for r instruments to proxy for r target
shocks.
You can type
. ivsvar gmm y1 y2 (y3 = z1)
to instrument the y3 shock with proxy z1.
When you have multiple instruments and multiple shocks, use ivsvar
mdist.
To graph structural IRFs after ivsvar gmm or ivsvar mdist, you can
type
. irf set myirfs.irf
. irf create model
. irf graph sirf
Specifying sirf plots the structural IRFs, just like after svar.
Learn more at stata.com/statanow/svar-models-instrumental-variables.
4. (StataNow) Meta-analysis for correlations. Correlation studies are a
cornerstone in many fields of research, often used to determine the
strength and direction of the relationship between two continuous
variables.
The meta suite has been extended to perform meta-analysis of
correlations. For instance, you may have studies reporting the
correlation between education and income levels or between physical
activity and improvements in mental health. In this setting, effect
sizes such as Fisher's z-transformed correlations are typically used
in the meta-analysis.
Consider a study that reports the correlation coefficient between
physical activity and improvements in mental health indicators (for
example, depression or anxiety) as well as the study sample size.
Suppose that similar studies have been conducted across the country,
and the results are recorded in variables rho and ssize. To compute
the Fisher's z-transformed correlations, we type
. meta esize rho ssize, fisherz
Or perhaps we wish to use the raw (untransformed) correlations:
. meta esize rho ssize, correlation
All the commands in the meta suite that are available for two-sample
binary or continuous data are also available for correlation data.
For example, we may conduct subgroup analysis using variable subgrvar
and request that results be reported as correlations as opposed to
Fisher's z-values by typing
. meta forestplot, subgroup(subgrvar) correlation
or construct a funnel plot by typing
. meta funnelplot
Learn more at stata.com/statanow/meta-analysis-correlations.
5. (StataNow) Inference robust to weak instruments after IV regression.
New postestimation command estat weakrobust performs tests on the
coefficients of the endogenous regressors after fitting a model with
ivregress. These tests are valid even when instruments are weak.
estat weakrobust can also estimate confidence intervals robust to
weak instruments when there is a single endogenous regressor.
Learn more at
stata.com/statanow/inference-robust-to-weak-instruments.
6. (StataNow) Asymmetric Laplace likelihood for Bayesian models.
Estimation command bayesmh supports a new likelihood, asymlaplaceq(),
in option likelihood(). asymlaplaceq(sigma, tau) specifies an
asymmetric Laplace (quantile) distribution with scale sigma and
quantile tau.
The new likelihood is useful for fitting asymmetric Laplace Bayesian
models, also known as Bayesian quantile regressions. A univariate
Bayesian quantile regression can be fit more easily by using new
command bayes: qreg. The new likelihood in bayesmh provides for
fitting a larger class of quantile models, including random-effects,
multilevel, and multivariate quantile regressions.
Learn more at stata.com/statanow/bayesian-asymmetric-laplace-model.
7. (StataNow) Robust standard errors for VAR models. Estimation command
var for fitting vector autoregressive (VAR) models now supports
option vce(robust) to estimate robust standard errors.
8. (StataNow) New in causal inference. Estimation command teffects aipw
has the following improvements:
a. Option atet can now be specified to estimate average treatment
effects on the treated.
b. pweights can now be specified to adjust results for sampling
weights.
9. (StataNow) Do-file Editor enhancements. The Do-file Editor has the
following additions:
a. Code folding enhancements. Code folding allows you to selectively
hide parts of a document so that you can focus on sections of
interest. Stata’s Do-file Editor allows you to selectively fold
blocks of code in a do-file such as programs, Mata code, Python
code, functions, and if statements by collapsing them to a single
line. You can now quickly fold all foldable blocks of code in
your do-file by using the Fold all menu item. You can then
selectively unfold your code one fold point at a time to show the
more important parts of your do-file, or you can use the Do-file
Editor’s Unfold all menu item to unfold every fold point. You can
also select lines of code and transform them into a foldable block
of code by using the Fold selection menu item. This can tidy up
your code and increase the code’s readability. And finally, there
is a new setting for the Do-file Editor that will automatically
fold every foldable block of code of a do-file when it is opened.
b. Autocomplete variable names. Stata’s Do-file Editor now includes
the ability to autocomplete variable names from data in memory.
If you pause briefly as you type, the Do-file Editor will suggest
a list of commands, variable names of data in memory, and words
that are already in the do-file. Once the suggestions appear,
more typing will narrow down the possibilities. You can navigate
the suggestions by using the up- and down-arrow keys or keep
typing to narrow them to a single word. Once you have the word
you like, you can press Return to place the word in your do-file.
10. (StataNow) PyStata enhancements. PyStata features for integrating
Python into Stata and integrating Stata into Python have the
following improvements:
a. Auto-completion. When running Stata code within an IPython
kernel-based environment, such as Jupyter Notebook and console as
well as Jupyter Lab and console, and within other environments
that support the IPython kernel, such as Spyder IDE and PyCharm
IDE, Stata’s variable names in the current working dataset, macro
names, and results r(), e(), and s() can now be autocompleted as
you type by pressing the Tab key.
You can enable or disable autocompletion by using new function
set_autocompletion() in the config module or by using new setting
%pystata set autocompletion.
b. %help magic. A new line magic %help [command_or_topic_name] is
now available; it allows you to view the help information of the
specified Stata command or topic in the web browser.
c. Control output. You can now control whether to echo the Stata
commands along with their output when executing them in the Python
environment; and you can control whether to display Stata’s output
simultaneously when the execution begins or to display the output
after Stata finishes execution.
You can suppress Stata commands by using the new argument -nocmd
in the %%stata magic. You can also set whether to echo commands
by using new function set_command_show() in the config module or
by using new setting %pystata set command_show.
You can control whether to display Stata's output while Stata is
executing by using new function set_streaming_output() in the
config module or by using new setting %pystata set
streaming_output.
d. New BreakError class. In the sfi module, new class BreakError is
available; it allows for interrupting Python execution by using
the Break key in Stata. When executing a time-consuming Python
task within Stata, it may be necessary to interrupt the task and
return control to Stata. When Break is pressed, the Python task
can now recognize this event and a BreakError exception will be
triggered from the Python environment in Stata. This exception
can be further caught within a try/except Python block. It gives
users the flexibility to terminate a time-consuming Python task
and handle a clean-up task before returning control to Stata.
11. (StataNow) Color more graphs by variable. Option colorvar() is now
available with more twoway plots: line, connected, tsline, rline,
rconnected, and tsrline. This option allows plots to vary color of
lines, markers, and more based on the values of a specified variable.
-------- update 29apr2024 -----------------------------------------------------
1. hdidregress twfe and xthdidregress twfe with option hettype(time),
when covariates were specified in the outcome equation, did not
include the triple interaction of the covariates with the treatment
variable and time period for periods after the last treatment time.
This has been fixed.
-------- update 04apr2024 -----------------------------------------------------
1. table now supports abbreviated statistics in options nformat() and
sformat(). For example, nformat(%9.1f freq) is now understood to
mean nformat(%9.1f frequency). The list of supported abbreviations
is documented in option statistic().
2. telasso has new option exposure(), which specifies the exposure for
the Poisson outcome model.
3. When working with h2o, subcommands of _h2oframe no longer require a
leading underscore. For example, _h2oframe put can be used instead
of _h2oframe _put. However, the subcommands with the leading
underscore (for example, _h2oframe _put) remain available as
synonyms.
4. When using the experimental H2O features in Stata, h2o init created a
new H2O cluster using H2O's defaults, which resulted in an H2O
instance that could be accessed by anyone who already had access to
the same computer. h2o init will now generate credentials and create
new H2O instances using those credentials by default. New commands
h2o credentials query and h2o credentials clear are available for
retrieving and managing credentials that Stata automatically creates
using h2o init. To duplicate the old behavior, H2O instances may be
spawned outside of Stata by using H2O's command line.
5. The Data Editor now supports left- or right-aligning text based on
the justification from a variable's format. The setting can be
enabled from the Data Editor's preferences.
6. Online help and the search index have been brought up to date for
Stata Journal 24(1).
7. gmm with option xtinstruments() has the following fixes and
improvements:
a. gmm with option xtinstruments() now returns a warning when robust
standard errors are used when there is only one panel.
b. gmm with option xtinstruments() specified with multiple lags when
some panels had gaps at the beginning of the time series returned
incorrect results. This has been fixed.
c. gmm with options xtinstruments() and vce(robust, independent)
returned standard errors that were too small. This has been
fixed.
d. gmm with options xtinstruments() and center exited with an
uninformative error message. This has been fixed.
e. gmm with option xtinstruments(), when the time-variable or
panel-variable values were missing in some observations, exited
with an uninformative error message. This has been fixed.
8. collect did not follow the same factor-variable expansion rules as
Stata's fvvarlist for dimensions across, coleq, colname, roweq,
rowname, and var. This has been fixed.
For example,
. sysuse auto
. collect : regress mpg foreign#rep78 foreign
. collect layout (colname[foreign]) (result[_r_b])
Notice that in the model specification, foreign is present in two
terms. The first term is the interaction foreign#rep78, and here
foreign is treated as a factor variable. The second term is foreign
and, without a factor-variable operator, it is treated as a
continuous predictor. Before the fix, the layout was incorrectly
translated to
. collect layout (colname[i.foreign]) (result[_r_b])
instead of keeping foreign as an unadorned variable name. Prior to
the fix, the only work-around was to use c. notation, as in
colname[c.foreign], to prevent translation to colname[i.foreign].
9. collect get will now produce a warning for each result name that
corresponds with a composite result. Items tagged with a result
level that corresponds with a composite result name cannot be found.
10. dtable with option by() failed to preserve the sort order of the
current frame. This has been fixed.
11. estat vce with option block and with estimation results containing
free parameters, such as /:cut1, incorrectly exited with an unhelpful
error message, such as ":cut1" invalid name. This has been fixed.
12. margins with option post and results from heckman, twostep
incorrectly exited with error message "last estimates not found".
This has been fixed.
13. meta summarize, when subsetting observations using the if or in
qualifier and when options transform() and level() were specified
simultaneously, exited with a Mata conformability error. This has
been fixed.
14. predict with option latent(), which is used to compute empirical
Bayes predictions of the latent endogenous variable, when used with
gsem with option group() and estimation results from a model with a
latent endogenous variable, incorrectly exited with an unhelpful
error message. This has been fixed.
15. putdocx table, when adding a table to a document and when specified
with option width(matname), sometimes exited with the error message
option width() specified incorrectly
The sum of the column widths specified in matrix matname must
be equal to 100.
even when the sum of the column widths specified in matname equaled
100. This has been fixed.
16. When adding multiple texts using putpdf text to a paragraph created
by putpdf paragraph, and when the texts used fonts with different
height, a half-point (1/144 inch) space was accidentally added among
those texts. This has been fixed.
17. pwcorr's matrix result r(Nobs) did not have the same row and column
names as the posted correlations matrix r(C). This has been fixed.
18. sureg and reg3 with option sure, ols, or mvreg returned the names of
all dependent variables in e(exog), even though those variables were
not exogenous. This has been fixed.
19. table, when specified with a numeric variable requiring more than 8
digits of precision in rowspec, colspec, or tabspec, incorrectly used
scientific notation instead of the proper precision. This typically
resulted in some categories not being properly accounted for. This
has been fixed.
-------- update 14feb2024 -----------------------------------------------------
1. graph export, when exporting to a PDF file, now has new pdf_options
to customize the file to be generated. With pdf_options, you can,
for example, set the font, width, and height of the PDF file.
2. graph set has new subcommand pdf, which allows you to permanently set
options supported by graph export when exporting Stata's graphics to
a PDF file. It also allows you to list the current graphics font and
export settings for exporting to a PDF file.
3. dtable with option continuous(, test(ctest)) now supports continuous
test (ctest) kwallis_ties for reporting the p-value of the
Kruskal-Wallis rank test adjusted for ties.
4. New Mata function deriv_init_technique() allows you to use a new
complex step method to compute first-order numerical derivatives;
this complex step method is a more accurate alternative to the
numerical differentiation method, which suffers from round-off error.
5. The following new Mata functions for numerical derivatives are now
available:
deriv_init_usemin() sets whether to use minimum values of step
sizes for computing numerical derivatives.
deriv_init_min() sets the minimum values of step sizes used for
computing numerical derivatives.
optimize_init_deriv_usemin() sets whether to use step sizes for
computing numerical derivatives.
optimize_init_deriv_min() sets the minimum values of step sizes
used for computing numerical derivatives.
moptimize_init_deriv_usemin() sets whether to use minimum values
of step sizes for computing numerical derivatives.
moptimize_init_deriv_min() sets the minimum values of step sizes
used for computing numerical derivatives.
solvenl_init_deriv_usemin() sets whether to use minimum values of
step sizes for computing numerical derivatives.
solvenl_init_deriv_min() sets the minimum values of step sizes
used for computing numerical derivatives.
The classical method to compute numerical derivatives is the
numerical differentiation method; this method can produce unstable
results when the computed step size, delta, is too small. These new
functions allow lower bounds for step sizes to be set.
6. ml model has new option deriv() for specifying whether to use minimum
values of step sizes for computing numerical derivatives and
optionally for specifying the minimum values. The numerical
differentiation method used for iterative maximization can produce
unstable results when the computed step size, delta, is too small;
deriv() allows you to set lower bounds for step sizes.
7. Online help and the search index have been brought up to date for
Stata Journal 23(4).
8. The Java Development Kit that is redistributed with Stata is now
updated to version 17.0.10+7-LTS acquired from Azul Systems.
9. estat bdecomp with option graph, when set varabbrev was set to off,
erroneously exited with an error message and did not produce the
graph. This has been fixed.
10. pksumm with option graph, when the concentration variable has a
variable label, erroneously used the variable label as the x-axis
title on the graph. This has been fixed, and the correct x-axis
title is now used.
11. In the PyStata module, when calling function pdataframe_to_data(df,
force=False) or pdataframe_to_frame(df, stfr, force=False), defined
in the stata module, or when using the -d and -f arguments of Python
package pystata to push a pandas DataFrame to Stata as the current
dataset in memory or a Stata frame, and when the pandas DataFrame
contains some column with nullable data types, such as Int64 and
Float64, and when the column contains pandas.NA values, those values
failed to be stored as Stata's missing values. This has been fixed.
12. scatter with options colorvar() and msymbol(), when any hollow
symbolstyle was specified in msymbol() (for example, circle_hollow),
did not draw the symbols in the legend as hollow. This has been
fixed.
13. teffects aipw with option nls or wnls and importance weights took
extra GMM steps to converge. The iweights were being ignored when
computing the initial estimates. This has been fixed.
14. xtdescribe is documented as allowing the command to be abbreviated to
xtdes. While Stata allowed xtdes, it did not allow the other
abbreviations (such as xtdesc). This has been fixed.
15. (Unix) The Data Editor uses the current desktop theme as a source of
colors for items such as highlighting and grid rendering. The Data
Editor now includes a preference to use its default color scheme
instead of the current desktop theme.
-------- update 20dec2023 -----------------------------------------------------
1. New scheme stsj reflects the style of the st family of schemes.
Scheme stsj follows the same style as scheme sj but with horizontal
labels on the y axis and a white background. This scheme will now be
the official scheme for the Stata Journal.
2. icd10cm and icd10pcs have been updated for the 2024 fiscal year.
Type icd10cm query or icd10pcs query to see information about the
changes.
3. collect, when specified with square brackets as part of the level of
a dimension, would cause Stata to become unresponsive. For example,
collect style cell result[_r_b#colname[x]], nformat(%7.2f)
caused Stata to become unresponsive. This has been fixed.
The most likely source for this specification is a typo, where we
meant to type
collect style cell result[_r_b]#colname[x], nformat(%7.2f)
The example with the typo now results in a note that collect could
not find the misspecified level of dimension result.
Square brackets are allowed to be part of the levels of dimensions,
so the first example should not have caused Stata to become
unresponsive nor should it have caused a syntax error.
4. dtable with option halign() unintentionally reported warning
"(dimension cell_type not found)". This has been fixed.
5. file write did not properly reset the range of observations after by.
Instead of using the whole range, it used the range of the last by
group. This has been fixed.
6. fvrevar and fvexpand, when no factor-variable or time-series
operators are specified, are now faster.
7. graph twoway with suboptions ring() and span specified in option
legend() produced a syntax error. This has been fixed.
8. Mata function bufput() with format %1bs for a 1-byte signed integer
mistakenly had the range -127 to 127. This has been fixed to the
correct range -128 to 127. Any integer less than or equal to -128
used to map to -127 but now maps to -128.
9. mata matuse has the following fixes:
a. mata matuse, when the saved Mata class object contained a
transmorphic scalar that was a Mata struct scalar, crashed Stata.
This has been fixed.
b. mata matuse was unnecessarily strict about reading 0-length
vectors. It changed an object's dimension from n x 0 or 0 x n to
1 x 0 or 0 x 1 based on whether the object was declared as a
rowvector or colvector. This has been fixed so the object retains
the original dimension.
10. Python code, when defined within python[:] and end that were run from
the Command window or from a do-file with Python 3.12 or above and
when there was a compound statement (such as for or def), failed to
execute the corresponding Python code. This has been fixed.
11. reri, when specified with a missing value in the first observation of
either binary variable var1 or var2, incorrectly exited with a
conformability error. This has been fixed.
12. rocregplot with option legend() caused the command-specific ordering
and texts for the legend keys to be discarded. This has been fixed.
13. xttest0 after xtreg, when a model was fit with time-series operators
to define the dependent variable, exited with an uninformative error
message. This has been fixed.
14. (Stata MP) Stata string functions regexmatch(), regexreplace(), and
regexreplaceall(), when used with a variable from a dataset that was
large, could cause Stata to crash. This has been fixed.
15. (Windows) When displaying numerical formats of %#.0f, %#.0fc, %0#.0f,
and %-#.0f, Stata displayed a 0 instead of a 1 when the value was 0.5
to 0.6 exclusive. This was due to a bug in the Microsoft SDK that
was previously used to build Stata on Windows. This has been fixed.
16. (Windows) When creating several thousand graphs, Stata could freeze
because of a resource leak that occurred when creating each new Graph
window. This has been fixed.
-------- update 15nov2023 -----------------------------------------------------
1. New setting set docx_maxtable allows you to specify the maximum
number of tables allowed in putdocx. The setting defaults to 500.
It can be changed to any number between 1 and 10,000.
2. New setting set pdf_maxtable allows you to specify the maximum number
of tables allowed in putpdf. The setting defaults to 500. It can be
changed to any number between 1 and 10,000.
3. frame now posts frame to c(prefix). See set prefix.
4. The Java Development Kit that is redistributed with Stata is now
updated to version 17.0.9+8-LTS acquired from Azul Systems.
5. gsem, meglm, melogit, meprobit, mecloglog, meologit, meoprobit,
mepoisson, menbreg, and mestreg, when called with user version less
than 15, incorrectly used modern stripe syntax for variance
components, like /:var(I[group]) instead of var(I[group]):_cons. This
has been fixed.
6. import shp exited with error message "st_sstore(): 3300 argument out
of range" for shapefiles that stored data past the last coordinate.
This has been fixed.
7. marginsplot after the 30aug2023 update, when specified with twoway
option legend() within option addplot(), ignored option legend()
specified outside option addplot(). This has been fixed.
8. Mata functions st_matrixcolstripe() and st_matrixrowstripe(), when
attaching row and column stripes to Stata matrices, failed to abort
with an error message when the specified stripe strings were not
valid, for example, if a string was too long. This has been fixed.
9. Mata function __lnmvnormalden() caused a memory leak that could be
observed when the function was called repeatedly with large matrix
arguments. This has been fixed.
10. npregress kernel and npregress series, when specified with qualifier
if and a function with comma-separated arguments, exited with an
uninformative error message. This has been fixed.
11. predict after cpoisson fit a constant-only model exited with an
uninformative error message. This has been fixed.
12. predict, when specified with options te or cmean after teffects aipw,
produced incorrect predictions. This has been fixed.
13. stci with option emean or rmean, when the dataset contained
delayed-entry subjects, sometimes reported mean survival times that
were too small. This has been fixed.
14. sts list, when the dataset was stset with option scale(), in rare
cases did not display the last observed time. This has been fixed.
15. teffects aipw, when used with treatment-assignment model hetprobit(),
could yield imprecise standard error estimates or lack of convergence
for models that should have converged. This has been fixed.
16. telasso with option atet produced an incorrect standard error for the
potential outcome mean (POM). This has been fixed.
17. (Mac) When resizing a graph window that contained a wide graph, the
sides of the graph would not appear within the window if the width
and height of the window were equal. This has been fixed.
18. (Mac) When exporting a graph to a bitmap image, the left and right
edges of the image could contain a dark border. This has been fixed.
19. (Unix) Stata would become unresponsive if the Data Editor was
filtering on a variable and the filter variable was dropped. This
has been fixed.
20. (Unix) The Do-file Editor could potentially crash when recovering a
backup file. This has been fixed.
-------- update 04oct2023 -----------------------------------------------------
1. reshape has new option favor(), which allows you to specify that
Stata favor memory or speed when reshaping data. New setting set
reshape_favor allows you to do the same thing.
When reshape favors speed, it now reshapes the data much faster.
Depending on the size of the dataset, the reshape may be 10 times,
100 times, or even more times faster.
2. graph twoway now supports aspect ratios that provide common units in
the x and y dimensions. Adding option aspectratio(1, units) creates
a graph where one unit in the x dimension and one unit in the y
dimension each take up the same distance on the plot. This is useful
for plotting things such as latitude against longitude, which have
common scaling of their units.
You can also specify arbitrary relative scales -- typing
aspectratio(100, units) specifies that each unit in the y dimension
is 100 times the length of a unit in the x dimension.
3. graph export now supports OpenType fonts (.otf) when exporting the
current graph to SVG, PDF, PNG, JPEG, EMF, TIF, and GIF.
4. putpdf now supports OpenType fonts (.otf).
5. collect export, dtable, and etable now support OpenType fonts (.otf)
when exporting a table to PDF.
6. Online help and the search index have been brought up to date for
Stata Journal 23(3).
7. collect layout now uses the numerical sort order of factor-variable
levels in dimensions across, coleq, colname, roweq, rowname, and var.
This affects layout specifications like var[fvar] and var[i.fvar]
that rely on the layout logic to expand and order the levels of
factor-variable fvar within dimension var. The old behavior of using
the string sort order is not preserved under version control.
8. collect levelsof after table and dtable now uses the numerical sort
order of dimension levels constructed from numerical variables. The
old behavior of using the string sort order is not preserved under
version control.
9. mlogit no longer allows aweights. Support for aweights was removed
from this command because this estimator is not suitable for
aweighted data. For reproducibility, aweights are available under
version control; see version.
10. areg with options absorb(absorbvar) and vce(cluster clustvar), where
absorbvar differed from clustvar and in the rare case where the
number of clusters was less than the rank of the VCE without
clustering, produced an incorrect e(rmse), root mean squared error.
This has been fixed.
11. estat atetplot after xthdidregress or hdidregress did not draw the
graph for the last cohort when the not-yet-treated group was used as
the comparison group and the last cohort was not the last time
period. This has been fixed.
12. graph twoway option zlabel(, valuelabel) ignored the value label for
z-axis tick labels. This has been fixed.
13. merge has the following fixes:
a. merge after the 30aug2023 update, when option keep() was specified
but option assert() was not specified, used more memory and was
slower. This has been fixed.
b. merge failed to exit with an error message when any but the last
specified key variable was of type strL. This has been fixed.
14. predict after gsem with ordinal logit outcomes and latent variables,
when specified to compute the empirical Bayes means of the latent
variables using more integration points for the prediction than were
used for estimation, sometimes exited with the following error
message:
could not compute empirical Bayes means;
missing values were returned by the evaluator
This has been fixed.
15. When copying data from the Data Editor to the Clipboard, the set dp
comma setting was ignored. This has been fixed.
16. (Mac) The Data Editor would not correctly render the data grid
contents when scrolling on macOS 10.13 (High Sierra). This has been
fixed.
-------- update 30aug2023 -----------------------------------------------------
1. New schemes stmono1 and stmono2 reflect the style of the st family of
schemes but with a monochromatic foreground. These schemes are
useful for creating a graph with horizontal labels on the y axis, a
single-column legend on the right side of the graph, a dashed pattern
for the major grid line, and monochromatic markers and fill colors.
2. mixed, menl, meta meregress, meta multilevel, and meta mvregress have
numerical improvements in the likelihood computation. Small
numerical differences in output can be expected.
3. The Java Development Kit that is redistributed with Stata is now
updated to version 17.0.8+7-LTS acquired from Azul Systems.
4. The Do-file Editor will now extend syntax highlighting of comments to
lines joined by ///.
5. The default type of variables _index and _frequency in MCMC
simulation datasets produced by bayesmh and other bayes commands was
changed from int to long. This may affect community-contributed
commands that access MCMC simulation datasets directly and use
variable _index.
6. Sorting on an alias variable, referencing a string variable in a
linked frame where not all observations in the current frame matched
with an observation in the linked frame, would sometimes crash Stata.
This has been fixed.
7. collect get with estimation results from mixed incorrectly flagged
all interaction coefficients with factor variables as empty when they
should have been identified as base. This has been fixed.
8. The 13jul2023 update to dtable and table broke parsing of numeric
formats containing a comma in option nformat(). For example, after
this update, specifying nformat(%18,1f) caused the error message
'%18' found where numeric format expected. This has been fixed.
9. dtable has the following additional fixes:
a. dtable, when specified with if e(sample), exited with error
message "no observations", even when e() was properly created by a
prior estimation command. This has been fixed.
b. dtable, when specified with multiple note() options, incorrectly
kept the specified quotes around the second and following notes.
The correct behavior is to drop quotes. For example,
. dtable, note("Note 1") note("Note 2")
was resulting in notes
Note 1
"Note 2"
instead of
Note 1
Note 2
This has been fixed.
c. dtable with option subpop() computed restricted sample variances
and standard deviations instead of subpopulation sample variances
and standard deviations. The reported values approximately
differed by the ratio of the average population weight over the
average subpopulation weight. This has been fixed.
10. levelsof varname with option matcell(matname) but without option
missing, when varname was a string variable containing at least one
empty string "", produced matname that did not contain the frequency
of the last value. This has been fixed.
11. makespline rcs with option harrell now imposes that the smallest knot
may not be smaller than the fifth-smallest value of the variable used
to create the basis and the largest knot may not be greater than its
fifth-largest value.
12. marginsplot, when specified with option addplot(), ignored option
legend(). This has been fixed.
13. merge with options keep() and assert(), when the results of the merge
failed to match option assert(), would not leave unmatched data from
the using dataset in memory for inspection after the failed merge.
This has been fixed.
14. meta summarize with option citype(), when working with proportion
data and in the presence of a missing value in either the number of
successes variable or the study sample-size variable, exited with an
uninformative error message. This has been fixed.
15. mvencode, when used with noninteger values, sometimes failed to
identify these values in variables of type float because these values
were treated as doubles. When specified values already exist in the
variables, an error message should be issued by default. When these
values were not identified, the command did not issue an error
message and preceded to do the encoding. This has been fixed.
16. npregress series with basis bspline, when specified with option
knots() and weights, ignored the weights. This has been fixed.
17. stcurve with option at(), when used after stintreg with option
distribution(ggamma), exited with a noninformative error message
instead of producing graphs. This has been fixed.
18. twoway contour and twoway contourline with option xlabel(,
valuelabel) or ylabel(, valuelabel) failed to use value labels. This
has been fixed.
19. In the Data Editor, if editing while an observation filter was
applied and with live filtering enabled, changing a cell could
incorrectly change the observation directly below the intended
observation in the grid. However, this would only occur if the
intended edit would cause the original observation to disappear due
to live filtering. This has been fixed.
20. (Windows) When text was selected in the Results or Viewer window and
the Edit > Copy as picture menu item was then selected, Stata copied
the text as an image using a monochrome scheme. Stata now copies the
text as an image using the current scheme of the Results or Viewer
window. The old behavior can be restored by opening General
preferences dialog and checking the checkbox for "Copy picture using
monochrome scheme".
21. (Windows) Function regexm() and Mata function regexm(), in rare cases
on some Microsoft Windows computers, triggered an assertion failure,
and the "Assertion Failed" dialog box appeared. This has been fixed.
-------- update 13jul2023 -----------------------------------------------------
1. dtable and table now support suboption basestyle within option
nformat(). This option allows you to change the format for results
that do not already have one, without overriding the format for all
results.
2. Online help and the search index have been brought up to date for
Stata Journal 23(2).
3. To disable the automatic backup feature of the Do-file Editor, you
can change the Backup modified documents interval to Never in the
Advanced settings of the Do-file Editor's Preferences dialog. You
can also enter the command set doeditbackup off to disable the
feature and set doeditbackup on to enable the feature. System
administrators can include the set command in a sysprofile.do to
disable the feature system wide instead of having to disable the
feature for each user account.
4. cnsreg, when specified with option vce(cluster clustvar), incorrectly
determined the residual degrees of freedom based on the sample size
instead of the number of clusters; thus, the residual degrees of
freedom was too large. This resulted in an incorrect value posted in
scalar e(df_r) and p-values that were typically smaller than they
should have been. This has been fixed.
5. estimates dir failed to show results after command bayesmh and prefix
command bayes. This has been fixed.
6. In Mata, after using st_framecurrent() to change the current frame,
st_view(V, real matrix i, rowvector j, scalar selectvar) specified
with a valid variable name in argument selectvar sometimes
incorrectly exited with the error "selectvar not found". This has
been fixed.
7. mlogit and mprobit have the following fixes:
a. mlogit and mprobit failed to include the base outcome equation in
matrix e(gradient) so that it is conformable with e(b). This has
been fixed.
b. mlogit and mprobit, when specified with a matrix in option from()
and that matrix contains an equation for the base outcome, will
now ignore that equation without requiring suboption skip.
8. putdocx with option alttext(text), when text contained any "&", "<",
or ">", incorrectly exited with an unhelpful error message. This has
been fixed.
9. In the [P] PyStata module, when calling function
pdataframe_to_data(df, force=False) or pdataframe_to_frame(df, stfr,
force=False), defined in module stata, or when using the -d and -f
arguments of Python package pystata to push a pandas DataFrame to
Stata as the current dataset in memory or a stata frame, and when the
pandas DataFrame has some non-numeric column that contains missing
values, such as NaN or NaT, those values failed to be stored as
Stata's missing values. This has been fixed.
10. In the Data Editor, the right-click context menu for editing value
labels could be disabled when it should not have been. This has been
fixed.
11. For Mac and Unix, Stata/MP no longer sets the idle wait time to 0
milliseconds by default and instead allows the OpenMP library to use
its current value for the idle wait time. Beginning with Stata/MP
18, the default setting for the time a thread should wait before
yielding the processor to other threads when it is idle was changed
to 0 milliseconds for Mac and Unix. Changing this setting freed up
resources for other processes and allowed the computer to be more
responsive, especially when used in a multi-user environment.
However, this change in the settings could also have an impact on
Stata/MP's parallelized-code performance. For Mac and Unix, Stata/MP
no longer sets the idle wait time to 0 by default and instead allows
the OpenMP library to use its current value for the idle wait time.
Stata/MP for Windows has historically been set to 0 to avoid
excessive CPU usage and continues to be so. For users who would like
to choose between computer responsiveness versus parallelized-code
performance, set kmp_blocktime allows you to set the time duration,
in milliseconds, for which a thread waits before yielding the
processor to other threads when it is idle.
12. (Win) Stata 18 could run slower than previous versions of Stata when
evaluating expressions. This decrease in performance was related to
a change in compiler-optimization behavior after the compiler we use
to build Stata was upgraded. This has been fixed.
13. (Win) After opening the Data Editor or Variables Manager, Stata could
freeze or become slow to respond to user interactions. This has been
fixed.
14. (Win) When entering certain Unicode characters in the Do-file Editor,
the autocomplete feature for autocompleting braces and quotes could
mistakenly insert an autocomplete character such as a right single
quote. This has been fixed.
-------- update 07jun2023 -----------------------------------------------------
1. The Java Development Kit that is redistributed with Stata is now
updated to version 17.0.7+7-LTS acquired from Azul Systems.
2. collect style row stack, when option nobinder is in effect, now
supports collect style header styles applied to factor variables
present in dimensions colname, coleq, rowname, roweq, var, and
across. For example, the following style change results in a table
where the title for variable foreign is hidden.
. sysuse auto
. dtable i.foreign
. collect style header foreign, title(hide)
. collect preview
Before this change, it was difficult to hide the title for variable
foreign for collect style row stack.
3. collect, when set collect_label default is in effect, has improved
logic for deciding when to label _r_z as "z" or "t", depending upon
the presence of residual degrees of freedom. For example, with
regress estimation results, _r_z is labeled as "t"; however, regress
with prefix bootstrap or vce(bootstrap) labels _r_z as "z". This
same logic is used to label _r_z_abs as "|z|" or "|t|".
4. bayes: var failed to drop collinear endogenous variables. This has
been fixed.
5. dtable has the following fixes:
a. dtable, when specified with a factor variable with a fixed decimal
digit format and option nofvlabel, failed to apply the format when
composing the factor variable's levels in the row header. This
has been fixed.
b. dtable, when specifying the word if or in within a title of option
sample() or column() suboption summary(), test(), or total(),
incorrectly exited with syntax error "in range not allowed" or "if
not allowed". The correct behavior is to accept everything up to
a comma or a closing parenthesis as the title. Titles with commas
still need to be quoted. This has been fixed.
c. dtable's dialog, after creating a factor definition in the Factors
tab, failed to update the list of factor definitions. This has
been fixed.
6. etable with suboption attach(_r_ci) in option stars() failed to show
the stars labels. This has been fixed.
7. estat sd has the following fixes:
a. estat sd, when used with results from bootstrap: mixed, reported
standard errors computed using the delta method applied to the
model-based VCE, when it should have used the delta method applied
to the bootstrap-based VCE. This has been fixed.
b. estat sd, when used with results from jackknife: mixed, reported
standard errors computed using the delta method applied to the
model-based VCE, when it should have used the delta method applied
to the jackknife-based VCE. This has been fixed.
8. graph twoway has the following fixes:
a. When option colorrule() was specified with argument phue along
with either intensity or opacity, the default scheme colors were
changed for subsequent graph twoway commands. This has been
fixed.
b. When options colorvar() and msymbol(i) were specified together, an
invalid syntax error was produced. This has been fixed.
c. Multiple graph twoway plots with option colorvar() could be
overlayed, which should not have been allowed. This has been
changed to produce error code 198 with a proper error message.
9. hdidregress and xthdidregress produced an uninformative error message
when time had a nonnumeric format. This has been fixed.
10. isid, when not specified with using filename and when a string
identifier began or ended with a blank space, did not retain the sort
order of the data in memory. This has been fixed.
11. ivqregress, when option vce(robust) was specified with if, ignored
the if. This has been fixed.
12. levelsof with an if expression containing a hyphen (-) produced an
uninformative error message. This has been fixed.
13. Accessing elements of Mata views was much slower at the release of
Stata 18 compared with Stata 17. This has been fixed.
14. proportion, when specified with option citype(exact) and more than
one constant variable, incorrectly exited with an unhelpful error
message. It now produces the requested proportion estimates.
15. putdocx table tablename = etable, when used with results from mixed,
incorrectly exited with error message "information for the estimation
table not found", even if specified directly after a replay of the
estimation results. This has been fixed.
16. regress, areg, and xtreg, fe, when requesting the multiway cluster
VCE with option vce(cluster varlist), has the following fixes and
improvements:
a. The notification for a VCE that is "not positive definite" has
been changed to "not positive semidefinite". These commands now
check for eigenvalues less than -1E-12 to make the calculation
more precise.
b. The rank of the multiway cluster VCE reported in e(rank) was
incorrect in the rare case where the minimum number of clusters is
less than the number of regressors. This has been fixed.
c. The xtreg, fe ereturn scalar e(df_m) was incorrect. This has been
fixed. This did not affect the standard errors or any other
computation.
d. The p-value for the model F test in the output header was
incorrect. The p-value reported did not account for clustering.
This has been fixed.
e. Weights were ignored. This has been fixed.
17. table, when specified with option markvar(), incorrectly exited with
error message "varname not found", where varname is a temporary
variable name like __000001. The reported table and collected
results were not affected by this error; the only thing lost was the
scalar result r(N). This has been fixed.
18. When updating Stata, users with slower connections could get a
timeout error. This has been fixed.
19. (Windows) The home directory might not be set properly in Stata if
the user's account name contained Unicode characters. This has been
fixed.
20. (Windows) The Data Editor failed to render ampersands that existed in
either string data or value labels. This has been fixed.
21. (Mac) The Data Editor's Variables pane was not saving the preferences
for the column widths. This has been fixed.
22. (Mac) The Value label property for a numeric variable could not be
changed in the Properties pane of the main Stata window and the
Properties pane of the Data Editor. This has been fixed.
23. (Unix) Using the keyboard shortcut for copy or paste in the Data
Editor always copied or pasted from the data grid even if the
keyboard focus was set to a text entry field. This has been fixed.
-------- update 15may2023 -----------------------------------------------------
1. collect layout with collect style row stack in effect, dimension dim
with a single level in the row specification, and collect style
header dimname, level(hide) also in effect misaligned the table item
rows. This has been fixed.
2. dtable, when specified with a variable having a leading capital
letter, incorrectly exited with error code 9999 but no error message.
It now produces the requested table.
3. graph twoway with option colorvar(colorvar), when the value of the
observations in colorvar was not represented exactly in binary and
when both options colordiscrete and coloruseplegend were specified
and neither option colorcuts() nor colorlevels() was specified,
wrongly colored those observations with the color for missing value.
This has been fixed.
4. table, when specified with options statistic(percent) and
statistic(percent varname) and no other variable names specified in
other statistic() options, failed to show the requested percent
statistics. This was also true for statistics proportion,
rawpercent, and rawproportion. This has been fixed.
5. xthdidregress and hdidregress have the following fixes:
a. xthdidregress and hdidregress now label always-treated
observations in the generated variable _did_cohort or the
user-provided variable in cohortvar() as "Always treated" and
gives them the extended missing value .a.
b. xthdidregress twfe and hdidregress twfe, when encountering groups
that were always treated, incorrectly dealt with them as if they
were never-treated groups. This has been fixed -- the commands
now produce an error message.
c. xthdidregress twfe and hdidregress twfe with option
controlgroup(notyet) calculated ATET parameters for time periods
after the last treatment time. However, these ATETs are not
identified and should not have been reported. This has been
fixed. The other ATETs that were reported were correct.
6. When downloading a file from the Internet that was redirected, the
redirected response was included in the downloaded file. This has
been fixed.
7. (Win) doedit path returned an error if path contained a directory
with Unicode characters. This has been fixed.
8. The Data Editor has the following fixes:
a. Variables that were formatted with any type of date format
displayed only the generic form of the date format, that is, %tc,
%td, %tw, etc. This has been fixed.
b. When copying, numeric missing values were copied as a literal "."
but should have been copied as an empty field. This has been
fixed.
c. (Mac) Filtering was extremely slow when there were lots of
observations. This has been fixed.
d. (Mac and Unix) When a cell that contains a string value is
selected, typing a character now displays the resizable cell
editor and replaces the existing string value with the character
that was typed.
e. (Mac and Unix) The status bar did not always reflect the current
state of the Data Editor. This has been fixed.
f. (Mac and Unix) The Data Editor could not display data that
contained extended ASCII strings instead of Unicode strings.
Stata does not support extended ASCII strings, so accented
characters may not display correctly in the Data Editor, but it
will now attempt to display as many characters as it can. You
should convert the strings to Unicode before importing the data
into Stata.
9. (Mac) A connected line in a graph could appear segmented when using a
large line width. This has been fixed.
10. (Mac and Unix) Running Stata in batch mode produced a .log or .smcl
file with the wrong filename if the do-file that was executed
contained a space in its path. This has been fixed.
-------- previous updates -----------------------------------------------------
See whatsnew17to18.
-------------------------------------------------------------------------------
```