11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

[ U ] 1.3 What’s new 9If you use user-written postestimation commands, you might need to use version control even whenworking interactively. There is a new feature of Stata 11, factor variables, that these commands mayknow nothing about if they were written before Stata 11. Until they are updated, you obviously willhave to avoid using factor variables with them. In our testing, these older commands mostly workedfine even without specifying version 10 before running them. There is, however, a technical issuerelated to how estimation results are stored and sometimes an older program would stumble on this.If the user-written postestimation command you are using acts up, run both the estimation commandand the postestimation command under version control. Then the user-written command will workbecause specifying version 10 really does make Stata 11 act like Stata 10.We will list all the changes, item by item, but first, here are the highlights:1. Stata now allows factor variables! In estimation, you can now fit models by typing, for example,. regress y i.sex i.group i.sex#i.group age (1). regress y i.sex##i.group age (same as 1). regress y i.sex i.group i.regioni.sex#i.group i.sex#i.region i.group#i.region (2)i.sex#i.group#i.regionage. regress y i.sex##i.group##i.region age (same as 2)and Stata will form for itself the indicator variables for sex, group, and region, and theirinteractions. You do not use the old xi command, and no new variables will be created in yourdata. You can form interactions of factor variables with continuous variables, and continuousvariables with continuous variables by using the c. prefix:. regress y i.sex##i.group##i.regionage c.age#c.age (3). regress y i.sex##i.group##i.regionage i.sex##i.group##i.region#c.age (4)c.age#c.age i.sex##i.group##i.region#c.age#c.age. regress y i.sex##i.group##i.region##c.age (same as 4)i.sex##i.group##i.region##c.age#c.ageThis new factor-variable notation is understood by nearly every Stata estimation command, soyou can type, for example,. logistic outcome i.treatment##i.sex age bp c.age#c.bpFactor variables work with summarize and list, too:. list outcome i.treatment##i.sexFactor variables have lots of additional features; see [U] 11.4.3 Factor variables.2. Stata 11’s new postestimation command margins estimates margins and marginal effects. Includedare estimated marginal means, least-squares means, average and conditional marginal and partialeffects, average and conditional adjusted predictions, predictive margins, and more. There arefew users who will not find margins useful. It will be well worth your time to read [R] margins.3. Stata’s new mi suite of commands performs multiple imputation. There is so much to say thatmi gets its own manual.mi provides methods for the analysis of incomplete data, data for which some values aremissing, and provides both the imputation and estimation steps. mi’s estimation step combinesthe estimation and pooling steps. Multivariate normal imputation is provided, along with fiveunivariate methods that can be used alone or as building blocks for multivariate imputation.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!