Stata 15 help for whatsnew12to13
What's new in release 13.0 (compared with release 12)
This file lists the changes corresponding to the creation of Stata
release 13.0:
++
 help file contents years 

 whatsnew Stata 15.0 and 15.1 2017 to present 
 whatsnew14to15 Stata 15.0 new release 2017 
 whatsnew14 Stata 14.0, 14.1, and 14.2 2015 to 2017 
 whatsnew13to14 Stata 14.0 new release 2015 
 whatsnew13 Stata 13.0 and 13.1 2013 to 2015 
 this file Stata 13.0 new release 2013 
 whatsnew12 Stata 12.0 and 12.1 2011 to 2013 
 whatsnew11to12 Stata 12.0 new release 2011 
 whatsnew11 Stata 11.0, 11.1, and 11.2 2009 to 2011 
 whatsnew10to11 Stata 11.0 new release 2009 
 whatsnew10 Stata 10.0 and 10.1 2007 to 2009 
 whatsnew9to10 Stata 10.0 new release 2007 
 whatsnew9 Stata 9.0, 9.1, and 9.2 2005 to 2007 
 whatsnew8to9 Stata 9.0 new release 2005 
 whatsnew8 Stata 8.0, 8.1, and 8.2 2003 to 2005 
 whatsnew7to8 Stata 8.0 new release 2003 
 whatsnew7 Stata 7.0 2001 to 2002 
 whatsnew6to7 Stata 7.0 new release 2000 
 whatsnew6 Stata 6.0 1999 to 2000 
++

Most recent changes are listed first.
 more recent updates 
See whatsnew13.
 Stata 13.0 release 17jun2013 
Remarks
We will list all the changes, item by item, but first, here are the
highlights.
What's new (highlights)
Here are the highlights. There are more, and do not assume that because
we mention a category, we have mentioned everything new in the category.
Detailed sections follow the highlights.
1. Long strings/BLOBs.
The maximum length of string variables increases from 244 to
2,000,000,000 characters. The standard string storage types
str1, str2, ..., str244 now continue to str2045, and after that
comes strL, pronounced sturl. All of Stata's string functions
work with twobillioncharacterlong strings, as do the rest of
Stata's features, including importing, exporting, and ODBC. strL
variables can contain binary strings. New functions, fileread()
and filewrite(), make it easy to read and write entire files to
and from strLs.
See [U] 12.4 Strings.
(BLOB stands for binary large object, jargon used by database
programmers.)
2. Treatment effects.
A new suite of features allows you to estimate average treatment
effects (ATE), average treatment effects on the treated (ATET),
and potentialoutcome means (POMs). Binary, multilevel, and
multivalued treatments are supported. You can model outcomes
that are continuous, binary, count, or nonnegative.
Treatmenteffects estimators measure the causal effect of
treatment on an outcome in observational data.
Different treatmenteffects estimators are provided for different
situations.
When you know the determinants of participation (but not the
determinants of outcome), inverseprobability weights (IPW) and
propensityscore matching are provided.
When you know the determinants of outcome (but not the
determinants of participation), regression adjustment and
covariate matching are provided.
When you know the determinants of both, the doubly robust methods
augmented IPW and IPW with regression adjustment are provided.
These methods are doubly robust because you need to be right
about only the specification of outcome, or of participation.
Also provided are two estimators that do not require conditional
independence. Conditional independence means that the treatment
and observed outcome are uncorrelated conditional on observed
covariates. Put another way, conditional independence implies
selection on observables. New estimation commands etregress and
etpoisson relax the assumption. (etregress is an updated form of
old command treatreg; etpoisson is new.)
See the allnew Stata TreatmentEffects Reference Manual, and in
particular, see [TE] teffects intro.
By the way, if treatment effects interest you, also see [SEM]
example 46g, where we use gsem  another new feature of Stata 13
 to fit an endogenous treatmenteffects model that can be
modified to allow for generalized linear outcomes and multilevel
effects.
3. Multilevel mixed effects and generalized linear structural
equation modeling (SEM).
In addition to standard linear SEMs, Stata now provides what we
are calling generalized SEMs for short. Generalized SEMs allow
for generalized linear response functions and allow for
multilevel mixed effects.
Generalized linear response functions include binary outcomes
(probit, logit, cloglog), count outcomes (Poisson, negative
binomial), categorical outcomes (multinomial logit), ordered
outcomes (ordered probit, ordered logit, ordered cloglog), and
more, which is to say, generalized linear models (GLMs).
Multilevel mixed effects include nested random effects such as
effects within patient within doctor within hospital and crossed
random effects. Multilevel mixed effects also include random
intercepts and random slopes.
In the language of SEM, "multilevel mixed effects" means latent
variables at different levels of the data. This means Stata 13
can fit multilevel measurement models and multilevel structural
equation models.
See [SEM] intro 1.
Economists: See [SEM] example 45g, where we show how to use
Stata 13's new SEM features to fit the Heckman selection model,
which can be extended to generalized linear outcomes and random
effects and random slopes.
4. New multilevel mixedeffects models.
Multilevel mixedeffects estimation has been improved and
expanded and is now the subject of its own manual. Stata had 3
multilevel estimation commands; now it has 11.
The eight new multilevel mixedeffects estimation commands are
melogit logistic regression
meprobit probit regression
mecloglog complementary loglog regression
meologit ordered logistic regression
meoprobit ordered probit regression
mepoisson Poisson regression
menbreg negative binomial regression
meglm generalized linear models
These new estimation commands allow for constraints on variance
components, provide robust and clusterrobust standard errors,
and are fast.
The three existing multilevel estimation commands have been
renamed: xtmixed is now mixed, xtmelogit is now meqrlogit, and
xtmepoisson is now meqrpoisson. All three now present results by
default in the variance metric rather than the standard deviation
metric.
As we said, multilevel mixedeffects modeling is now the subject
of its own manual. See Stata Multilevel MixedEffects Reference
Manual, and in particular, see [ME] me.
5. Forecasts based on systems of equations.
Stata's new forecast command allows you to combine estimation
results from multiple Stata commands or other sources to produce
dynamic or static forecasts and produce forecast intervals.
You begin by fitting the equations of your model using Stata's
estimation commands, or you can enter results that you obtained
elsewhere. Then you use forecast to specify identities and
exogenous variables to obtain a baseline forecast. Once you
produce the baseline forecast, you can specify alternative paths
for some variables and obtain forecasts based on those
alternative paths. Thus you can produce forecasts under
alternative scenarios and explore impacts of differing policies.
You can use forecast, for example, to produce macroeconomic
forecasts.
In addition, forecast is particularly easy to use because
forecast also provides an intuitive, interactive control panel to
guide you and, if you do something wrong, forecast itself offers
advice on how to fix the problem.
See [TS] forecast.
6. Power and sample size.
The new power command performs power and samplesize analysis.
Included are
Comparison of a mean to a reference value
Comparison of a proportion to a reference value
Comparison of a variance to a reference value
Comparison of a correlation to a reference value
Comparison of two independent means
Comparison of two independent proportions
Comparison of two independent variances
Comparison of two independent correlations
Comparison of two paired means
Comparison of two paired proportions
Results can be displayed in customizable tables and graphs.
An integrated GUI lets you select your analysis type, input
assumptions, and obtain desired results.
Power and sample size is the subject of its own manual. See
Stata Power and SampleSize Reference Manual; start by seeing
[PSS] intro.
7. New and extended paneldata estimators.
Two new randomeffects paneldata estimation commands are added:
xtoprobit ordered probit regression
xtologit ordered logistic regression
These new commands allow for clusterrobust standard errors.
The following previously existing randomeffects paneldata
estimation commands now allow for clusterrobust standard errors:
xtprobit probit regression
xtlogit logistic regression
xtcloglog complementary loglog regression
xtpoisson Poisson regression
See [XT] xt for a complete list of all of Stata's paneldata
estimators.
8. New commands are provided for calculating effect sizes after
estimation in the way behavioral scientists, and especially
psychologists, want to see them. Cohen's d, Hedges's g, Glass's
Delta, eta^2, and omega^2, with confidence intervals, are now
provided:
a. New commands esize and esizei calculate effect sizes
comparing the difference between the means of a continuous
variable for two groups. See [R] esize. {phang3} b. New
postestimation command estat esize computes effect sizes for
linear models after anova and regress. See [R] regress
postestimation. {phang2} 9. Project Manager.{break} The new
Project Manager lets you organize your analysis files  your
dofiles, adofiles, datasets, raw files, etc. You can have
multiple projects, and each can contain hundreds of files, or
just a few. {pmore2} You can see all the files in a project
at a glance, filter on filenames, and click to open, edit, or
run. {pmore2} Projects are portable, meaning that you can
pick the whole collection up at once and move it across
computers or share it with colleagues. {pmore2} Try it. Get
started from the Dofile Editor by selecting File > New >
Project ... {pmore2} See [P] Project Manager. {p 7 12 2}
10. Java plugins. {break} You can now call Java methods
directly from Stata. You can take advantage of the plethora
of existing Java libraries or write your own Java code. You
call Java using Stata's new javacall command. See [P] java
and see the JavaStata API specification at
http://www.stata.com/java/api/. {pmore2} Java recently
encountered some negative publicity regarding security
concerns. That publicity was about Java and web browsers
automatically loading and running Java code from untrusted
websites. It does not apply to Stata's implementation of
Java. Stata's implementation is about running Java code
already installed on your computer from known and trusted
sources. What's new that you will want to know {p 7 12 2}
11. You can clear the Results window.{break} Use the new cls
command. See [R] cls. {p 7 12 2} 12. Value labels of
factor variables used to label output.{break} You use
variable i.sex, and output now shows male and female in your
model rather than 0 and 1 if variable sex has a value label.
You can control how output looks. See more details below in
[U] 1.3.3 What's new in statistics (general). {p 7 12 2} 13.
Programmers can create Word and Excel files from
Stata.{break} You can add paragraphs, insert images, insert
tables, poke into individual cells, and more. {pmore2} See
[M5] _docx*() to create Word documents. {pmore2} See [P]
putexcel and [M5] xl() to interact with Excel files.
{pmore2} By the way, Stata could already import and export
Excel files; see [D] import excel. {p 7 12 2} 14. Searching
is better.{break} Here's why: {phang3} a. Help > Search...
and the search command now default to searching the Internet
as well as Stata's local keyword database. If you do not
want that, type set searchdefault local, permanently to set
Stata 13 to the old default. {phang3} b. search without
options now displays its results in the Viewer rather than in
the Results window. (If any options are specified, however,
results appear in the Results window.) {phang3} c. Existing
command findit is no longer documented but continues to work.
Changes to search make search into the equivalent of findit.
{pmore2} See [R] search. {p 7 12 2} 15. help now searches
when no help is found.{break} help xyz now invokes search xyz
if xyz is not found. See [R] help. {p 7 12 2} 16. Stata
now supports secure HTTP (HTTPS) and FTP. You can, for
instance, use datasets from sites using either of the
protocols. See [U] 3.5 Updating and adding features from the
web. {p 7 12 2} 17. Concerning the Data Editor, {phang3} a.
noncontiguous column selections are now allowed. {phang3} b.
encode, decode, destring, and tostring have been added as
operations that can be performed on selected variables.
{phang3} c. the Delete key can now be used to drop data.
{pmore2} See [GS] 6 Using the Data Editor (GSM, GSU, or GSW).
{p 7 12 2} 18. Concerning the Dofile Editor, {phang3} a.
matching braces are highlighted. {phang3} b. an adjustable
column guide has been added. {phang3} c. you can now zoom
in and out. {phang3} d. you can convert between the
different types of endofline characters used by Windows and
by Mac and Unix. {pmore2} See [GS] 13 Using the Dofile
Editorautomating Stata (GSM, GSU, or GSW). {p 7 12 2} 19.
Concerning Stata's GUI, {phang3} a. the Properties window
now displays the sortedby variables. {phang3} b. the Jump
To menu in the Viewer now allows you to jump to the top of
the page. {phang3} c. Stata for Windows now supports
Windows highcontrast themes. {p 7 12 2} 20. .dta file
format has changed.{break} The file format has changed
because of the new strL variables. Stata 13 can, of course,
read oldformat datasets. If you need to create datasets in
the previous format  used by Stata 11 and Stata 12  use
the saveold command. See [D] save. If you want to know the
details of the new .dta format, type help dta. {p 7 12 2}
21. Official directory ado/updates no longer used.{break}
Official adofile updates are no longer stored in directory
installationdirectory/ado/updates/. Updates are now applied
to ado/base directly. Modern operating systems do not
approve of applications such as Stata having multiple files
of the same name. The updates process remains the same. {p
7 12 2} 22. Videos.{break} Type help videos to list and link
to the videos on Stata's YouTube channel. We provide dozens
of tutorials on Stata's features. {p 7 12 2} 23. Fast
PDFmanual navigation.{break} There are now links at the top
of each manual entry to jump directly to section headings,
and on each page's header, there is a link to take you to the
beginning of the entry. {pmore2} If you did not know
already, clicking on the blue manual reference in the title
of a help file jumps to the PDF documentation. {p 7 12 2}
24. Manuals have color graphs.{break} If you want to use the
same color graph scheme we use in the manuals, type set
scheme s2gcolor. See [G4] scheme s2. {p 7 12 2} 25. Ten
new vignettes.{break} Scientific history buffs will want to
read about the following: {phang3} a. Florence Nightingale
{phang3} b. Florence Nightingale David, a different person
from Florence Nightingale {phang3} c. Charles William Dunnett
{phang3} d. Andrew Charles Harvey {phang3} e. William Lee
Hays {phang3} f. Fred Nichols Kerlinger {phang3} g. Janet
Elizabeth LaneClaypon {phang3} h. martingale {phang3} i.
Elizabeth L. "Betty" Scott {phang3} j. John Snow {pstd} The
following two items were added during the Stata 12 release:
{p 7 12 2} 26. New command icc computes intraclass
correlation coefficients for oneway randomeffects models,
twoway randomeffects models, and twoway mixedeffects
models for both individual and average measurements.
Intraclass correlations measure consistency of agreement or
absolute agreement. See [R] icc. {p 7 12 2} 27. New
postestimation command estat icc computes intraclass
correlations at each nesting level for nested randomeffects
models fit by mixed and melogit. See [ME] mixed
postestimation and [ME] melogit postestimation. What's new
in statistics (general) {pstd} Already mentioned as
highlights of the release were treatment effects, generalized
SEMs, multilevel mixedeffects models, power and sample size,
and paneldata estimators. The following are also new: {p 7
12 2} 28. Concerning sampleselection estimation commands,
{phang3} a. new estimation command heckoprobit fits the
parameters of an ordered probit model with sample selection.
See [R] heckoprobit. {phang3} b. existing estimation
command heckprob is renamed heckprobit. See [R] heckprobit.
{p 7 12 2} 29. Existing estimation command hetprob is
renamed hetprobit. See [R] hetprobit. {p 7 12 2} 30. New
estimation command ivpoisson fits the parameters of a Poisson
regression model with endogenous regressors. Estimates can
be obtained using the GMM or controlfunction estimators.
See [R] ivpoisson. {p 7 12 2} 31. New command mlexp allows
you to specify maximum likelihood models without writing an
evaluator program. You can instead specify an expression
representing the loglikelihood function in much the same way
you would with nl, nlsur, or gmm. See [R] mlexp. {p 7 12 2}
32. Concerning fractional polynomials, {phang3} a. new
prefix command fp: replaces fracpoly for fitting models with
fractional polynomial regressors. You type . fp ...:
estimation command {pmore2} Results are the same. The new fp
command supports more estimation commands, it is easier to
use, and it is more flexible. You can substitute the same
fractional polynomial into multiple places of the estimation
command, which is especially useful in multipleequation
models. You may now use factorvariable notation in the
estimation command. {phang3} b. fp generate replaces
fracgen. {phang3} c. fp plot replaces fracplot. {phang3}
d. fp predict replaces fracpred. {phang3} e. commands
fracpoly and fracgen are no longer documented but continue to
work. Commands fracplot and fracpred are still documented
for use after mfp. {pmore2} See [R] fp. {p 7 12 2} 33.
Concerning quantileregression estimation commands, {phang3}
a. existing estimation command qreg now accepts option
vce(robust). {phang3} b. existing estimation commands qreg,
iqreg, sqreg, and bsqreg now allow factor variables to be
used. {pmore2} See [R] qreg. {p 7 12 2} 34. Syntax and
methodology for predict after boxcox have changed. Predicted
values are now calculated using Duan's smearing method by
default. The previous backtransformed predictedvalues
estimates are provided if predict's btransform option is
specified and under version control. See [R] boxcox
postestimation. {p 7 12 2} 35. Value labels of factor
variables are now used by default to label estimation output.
The numeric values (levels) were previously used and continue
to be used if the factor variables are unlabeled. There are
three new display options that may be used with estimation
commands affecting how this works: {phang3} a. Option
nofvlabel displays factorvariable level values, just as
Stata 12 did previously. (You can set fvlabel off to make
nofvlabel the default.) {phang3} b. Option fvwrap(#)
specifies the number of lines to allow when long value labels
must be wrapped. Labels requiring more than # lines are
truncated. fvwrap(1) is the default. You can change the
default by using set fvwrap #. {phang3} c. Option
fvwrapon() specifies whether value labels that wrap will
break at word boundaries. {pmore3} fvwrapon(word) is the
default, meaning to break at word boundaries. {pmore3}
fvwrapon(width) specifies that line breaks may occur
arbitrarily so as to maximize use of available space.
{pmore3} You can change the defaults by using set fvwrapon
width or set fvwrapon word. {pmore2} Current default
settings are shown by query and also stored in c(fvlabel),
c(fvwrap), and c(fvwrapon). {pmore2} See [R] set
showbaselevels and [P] creturn. {p 7 12 2} 36. Existing
estimation command proportion now uses the logit transform
when computing the limits of the confidence interval. The
original behavior of using the normal approximation is
preserved under version control or when the new
citype(normal) option is specified. See [R] proportion. {p
7 12 2} 37. Concerning existing command margins, {phang3} a.
option at() has new suboption generate(), which allows you to
specify an expression to replace the values for any
continuous variable in the model. For example, you can
compute the predictive margins at x+1 by typing . margins,
at(x = generate(x+1)) {pmore3} at(generate()) can be combined
with contrasts to estimate the effect of giving each subject
an additional amount of x, . margins, at((asobserved) _all)
at(x= generate(x+1)) /// contrast(at(r._at)) {pmore3} See
Estimating treatment effects with margins in [R] margins,
contrast. {phang3} b. margins automatically uses the t
distribution for computing pvalues and confidence intervals
when appropriate, which is after linear regression and ANOVA
and whenever degrees of freedom are posted to e(df_r).
{pmore3} The previous default behavior of always using the
standard normal distribution for all pvalues and confidence
intervals is preserved under version control. {phang3} c.
new option df(#) specifies that margins is to use the t
distribution when it otherwise would not. {pmore2} See [R]
margins. {p 7 12 2} 38. nlcom and predictnl now use the
standard normal distribution for computing pvalues and
confidence intervals. Original behavior was to compute the
pvalues and CIs based on the t distribution in some cases.
Original behavior is preserved under version control. In
addition, if you want pvalues and confidence intervals
calculated using the t distribution, use new option df(#) to
specify the degrees of freedom. {pmore2} testnl's calculated
test statistic is now chisquared rather than F unless you
specify the df() option. {pmore2} See [R] nlcom, [R]
predictnl, and [R] testnl. {p 7 12 2} 39. contrast,
pwcompare, and lincom have new option df(#) to use the t
distribution in computing pvalues and confidence intervals.
For contrast, this option also causes the Wald table to use
the F distribution. {pmore2} See [R] contrast, [R]
pwcompare, and [R] lincom. {p 7 12 2} 40. estimates table's
option label is renamed varlabel. Original option label is
allowed under version control. See [R] estimates table. {p
7 12 2} 41. The previously existing sampsi command is no
longer documented because it is replaced by the new power
command  a highlight of the release. See [PSS] power. {p
7 12 2} 42. Existing functions normalden(x,mu,sigma) and
lnnormalden(x,mu,sigma) now allow you to omit argument mu or
arguments mu and sigma. mu=0 and sigma=1 is assumed. See
normalden(), lnnormalden(), and [FN] Functions by category.
{p 7 12 2} 43. The following new functions are added:
{synopt:t(df,t)}cumulative Student's t distribution{p_end}
{synopt:invt(df,p)}inverse cumulative Student's t
distribution{p_end} {synopt:ntden(df,np,t)}density of
noncentral Student's t distribution{p_end}
{synopt:nt(df,np,t)}cumulative noncentral Student's t
distribution{p_end} {synopt:npnt(df,t,p)}noncentrality
parameter of noncentral Student's t distribution{p_end}
{synopt:nttail(df,np,t)}righttailed noncentral Student's t
distribution{p_end} {synopt:invnttail(df,np,p)}inverse of
righttailed noncentral Student's t distribution{p_end}
{synopt:nF(df_1,df_2,np,f)}cumulative noncentral F
distribution{p_end} {synopt:npnF(df_1,df_2,f,p)}noncentrality
parameter of noncentral F distribution{p_end}
{synopt:chi2den(df,x)}density of chisquared
distribution{p_end} {synopt:fileread(f)}return the contents
of a file as a string{p_end}
{synopt:filewrite(f,s[,r])}create or overwrite file with the
contents of a string{p_end} {synopt:fileexists(f)}check
whether a file exists{p_end} {synopt:filereaderror(s)}use
results returned by fileread() to determine whether an I/O
error occurred{p_end} {pmore2} See help functionname() and
[FN] Functions by category. What's new in statistics (SEM)
{pstd} We have already mentioned a highlight of the release,
the new gsem (see [SEM] intro 1) command, for fitting
generalized SEMs. The following are also new: {p 7 12 2}
44. Existing estimation command sem has new option
noestimate, which is useful when you are having convergence
problems; you can use it to get the starting values into a
Stata matrix (vector) that you can then modify to use as
alternative starting values. See [SEM] intro 12. {p 7 12 2}
45. sem now supports timeseries operators on all observed
variables. See [SEM] sem. {p 7 12 2} 46. You can now use
postestimation command margins after sem. See [SEM] intro 7.
{p 7 12 2} 47. sem no longer reports in the estimation
output any zerovalued constraints on covariances between
exogenous variables; absence of the covariance indicates the
presence of the constraint. Original behavior is preserved
under version control. {p 7 12 2} 48. The new options for
controlling display of factor variables with value labels
mentioned in [U] 1.3.3 What's new in statistics (general) 
nofvlabel, fvwrap(#), and fvwrapon(wordwidth)  work with
varname of sem, group(varname). sem itself does not allow
factor variables, but the factorvariable display options
nonetheless work with group(varname). {pmore2} Thus old
options wrap() and nolabel are now officially fvwrap() and
fvnolabel, although the old option names continue to work as
synonyms. See [SEM sem reporting options. {p 7 12 2} 49.
We now show how to construct path diagrams at the end of each
estimation example in the manual. See [SEM] example 1, [SEM]
example 3, .... What's new in statistics (time series)
{pstd} We have already mentioned a highlight of the release,
the new [TS] forecast command. The following are also new:
{p 7 12 2} 50. New command import haver (available with
Stata for Windows only) replaces old command haver. import
haver imports economic and financial data from Haver
Analytics databases. See [D] import haver. {p 7 12 2} 51.
Existing command tsreport now provides better information
about gaps in timeseries and panel datasets, including the
length of each gap. {pmore2} In addition, tsreport will
provide information about missing values in variables even
where there are no gaps. {pmore2} See [TS] tsreport.
{pmore2} Also see item 55 in [U] 1.3.8 What's new in data
management for information on the new command bcal create.
What's new in statistics (longitudinal/panel data) {p 7 12 2}
We have already mentioned a highlight of the release, new and
extended paneldata estimators. What's new in statistics
(survival analysis) {p 7 12 2} 52. Shared frailty survival
models can no longer be fit when there is delayed entry or
there are gaps in time under observation. Said differently,
stcox and streg no longer allow option shared() when there
are delayed entry or gaps. The use of shared frailty models
to fit truncated survival data leads to inconsistent results
unless the frailty distribution is independent of the
covariates and the truncation point, which rarely happens in
practice. If you have such data and can make the
independence assumption  which is unlikely  estimation
can be forced by specifying undocumented option forceshared.
See [ST] stcox and [ST] streg. See st_forceshared for
information on the forceshared option. {p 7 12 2} 53.
Output produced by existing commands stset, streset, and
cttost more accurately labels time at risk. What was labeled
"total time at risk" is now labeled "total time at risk and
under observation". See [ST] stset and [ST] cttost. What's
new in data management {pstd} We have already mentioned a
highlight of the release, long strings/BLOBs. {p 7 12 2} 54.
New commands import delimited and export delimited supersede
old commands insheet and outsheet. This is not just a
renaming. {pmore2} import delimited supports several
different quoting methods. Some packages, for instance, use
"" in the middle of a string to represent an embedded double
quote. Others do not. {pmore2} import delimited now allows
column and row ranges (subsets). {pmore2} Use import
delimited's GUI to see a preview of the data and how they
will be read. You can also customize the GUI. {pmore2} Of
course, import delimited and export delimited support Stata
13's new strLs. {pmore2} See [D] import delimited. {p 7 12
2} 55. existing command bcal has new subcommand create to
create a business calendar from the current dataset
automatically. bcal create infers business holidays and
closures from gaps in the data. See [D] bcal. {p 7 12 2}
56. String expressions now support string duplication via
multiplication. For example, 3*"abc" evaluates to
"abcabcabc". See strdup() or [FN] Functions by category. {p
7 12 2} 57. Concerning long strings, that is, strLs,
{phang3} a. existing command compress has new option
nocoalesce in support of the new strL string storage type.
By default, compress coalesces the storage used to store
duplicated strL values. nocoalesce prevents this. {pmore3}
In addition, compress always considers demoting strL
variables to str# variables if that would save memory.
{pmore3} See [D] compress. {phang3} b. the output of
existing command memory has changed to include information on
new string storage type strL. See [D] memory. {phang3} c.
the options of existing command ds, such as has() and not(),
now understand string to mean both strL and str#, strL to
mean strL, and str# to mean str1, str2, ..., str2045. See
[D] ds. {phang3} d. existing command type has new option
lines(#) to list the first # lines of the file. See [D]
type. {pmore2} Also see item 50 in [U] 1.3.5 What's new in
statistics (time series) for information on the new command
import haver. What's new in Mata {p 7 12 2} 58. Programmers
can create Word and Excel files from Stata.{break} You can
add paragraphs, insert images, insert tables, poke into
individual cells, and more. {pmore2} See [M5] _docx*() to
create Word documents. {pmore2} See [P] putexcel and [M5]
xl() to interact with Excel files. {pmore2} By the way,
Stata could already import and export Excel files; see [D]
import excel. {p 7 12 2} 59. New functions in solvenl()
allow you to solve arbitrary systems of nonlinear equations.
GaussSeidel, damped GaussSeidel, BroydenPowell, and
NewtonRaphson techniques are provided. See [M5]
solvenl(). {p 7 12 2} 60. The same statistical functions
added to Stata have been added to Mata, namely, Noncentral
Student's t p = nt(df, np, t) d = ntden(df, np, t) q =
nttail(df, np, t) t = invnttail(df, np, q) np = npnt(df, t,
p) Student's t p = t(df, t) t = invt(df, p) Noncentral F p =
nF(df_1, df_2, np, f) np = npnF(df_1, df_2, f, p) chisquared
d = chi2den(df, x) {pmore2} See [M5] normal(). {p 7 12 2}
61. New function selectindex() returns a vector of indices
for which v[j] not equal 0. For instance, if v = (6, 0, 7,
0, 8), then selectindex(v) = (1, 3, 5). selectindex() is
useful with logical expressions, such as
x[selectindex(x:>1000)]. See [M5] select(). What's new in
programming {pstd} We have already mentioned the Project
Manager and Java plugins as highlights of the release. The
following are also new: {p 7 12 2} 62. New command putexcel
writes Stata expressions, matrices, and stored results to an
Excel file. Excel 1997/2003 (.xls) files and Excel 2007/2010
(.xlsx) files are supported. See [P] putexcel. {pmore2}
Mata programmers will also be interested in [M5] xl(), a
class to interact with Excel files. {p 7 12 2} 63. A new
set of Mata functions provide the ability to create Word
documents. See [M5] _docx*(). {p 7 12 2} 64. Concerning
strLs, {phang3} a. strL is now a reserved word. {phang3} b.
the maximum length of a string in string expressions
increases from 244 to 2billion characters. See limits.
{phang3} c. new c(maxstrlvarlen) returns the maximum possible
length for strL variables. {phang3} d. confirm ... variable
now understands str# to mean any str1, str2, ..., str2045
variable; strL to mean strL; and string to mean str# or strL.
See [P] confirm. {phang3} e. new function fileread(filename
[, startpos [, length]]) returns the contents of filename.
See fileread() and [FN] Functions by category. {phang3} f.
new function filewrite(filename, s [, {12}]) writes s to the
specified filename, optionally overwriting 1 or appending 2.
See filewrite() and [FN] Functions by category. {phang3} g.
new function fileexists(filename) returns 1 if the specified
filename exists, and returns 0 otherwise. {phang3} h. new
function filereaderror(s) returns 0 or a positive integer,
said value having the interpretation of a return code. It is
used like this {p 16 18 2} . generate strL s =
fileread(filename) if fileexists(filename){p_end} {p 16 18 2}
. assert filereaderror(s)==0 {pmore3}or this {p 16 18 2} .
generate strL s = fileread(filename) if
fileexists(filename){p_end} {p 16 18 2} . generate rc =
filereaderror(s) {pmore3} That is, filereaderror(s) is used
on the result returned by fileread(filename) to determine
whether an I/O error occurred. {pmore3} In the example, we
only fileread() files that fileexist(). That is not
required. If the file does not exist, that will be detected
by filereaderror() as an error. The way we showed the
example, we did not want to read missing files as errors. If
we wanted to treat missing files as errors, we would have
coded {p 16 18 2} . generate strL s =
fileread(filename){p_end} {p 16 18 2} . assert
filereaderror(s)==0 {pmore3} or {p 16 18 2} . generate strL s
= fileread(filename){p_end} {p 16 18 2} . generate rc =
filereaderror(s) {p 7 12 2} 65. New command expr_query exp
returns in r() the variables used in expression exp. See
undocumented and see expr_query. {p 7 12 2} 66. The maximum
number of elements in a numlist increases from 1,600 to
2,500. See [U] 11.1.8 numlist. {p 7 12 2} 67. Existing
command ereturn post now allows posting of noninteger as well
as integer dof() values. {p 7 12 2} 68. New c(hostname)
returns the computer's hostname. See [P] creturn. {p 7 12
2} 69. New c(maxvlabellen) returns the maximum possible
length for a value label. What's new, Mac only {pstd} In
addition to all the above What's New items, which apply to
all platforms, Stata for Mac has several of its own new
features: {p 7 12 2} 70. The Dofile Editor in Stata for
Mac has been completely rewritten. It now includes {phang3}
o code folding {phang3} o more robust syntax highlighting
that is consistent with highlighting in Windows and Unix
{phang3} o more color options for customizing its appearance
{phang3} o the ability to save the syntaxhighlighting colors
as separate themes {phang3} o line ending preservation and
normalization, which is useful for working in a mixed
platform environment where dofiles are exchanged between
Windows and Macs {phang3} o textsize zooming without having
to change the font or font size {phang3} o more draganddrop
options {phang3} o more control over the appearance of
printed files {p 7 12 2} 71. The Command window now has the
same syntax highlighting as the Dofile Editor. {p 7 12 2}
72. There is a new path control that not only shows the
current working directory but also can change the current
working directory and open Stata files without having to use
the Open dialog. {p 7 12 2} 73. Mac OS X 10.7 GUI
enhancements such as fullscreen support and textured
backgrounds for springback scrolling are now supported. {p
7 12 2} 74. There is a new interface for saving and managing
saved preferences. {p 7 12 2} 75. Applescript is better
supported and enables users to directly access Stata macros,
scalars, stored results, and datasets. {p 7 12 2} 76. Stata
for Mac is now 64bit only and allows the application's file
size to be roughly 67% smaller. What's more {pstd} We have
not listed all the changes, but we have listed the important
ones. {pstd} Stata is continually being updated. Those
betweenrelease updates are available for free over the
Internet. {pstd} Type update query and follow the
instructions. {pstd} We hope that you enjoy Stata 13.
 previous updates {hline} {pstd} See
whatsnew12.{p_end} {hline}
