Transcription of [U] User's Guide - Stata
1 Stata user S GUIDERELEASE 17 A Stata Press PublicationStataCorp LLCC ollege Station, Texas Copyrightc 1985 2021 StataCorp LLCAll rights reservedVersion 17 Published by Stata Press, 4905 Lakeway Drive, College Station, Texas 77845 Typeset in TEXISBN-10: 1-59718-353-9 ISBN-13: 978-1-59718-353-6 This manual is protected by copyright. All rights are reserved. No part of this manual may be reproduced, storedin a retrieval system, or transcribed, in any form or by any means electronic, mechanical, photocopy, recording, orotherwise without the prior written permission of StataCorp LLC unless permitted subject to the terms and conditionsof a license granted to you by StataCorp LLC to use the software and documentation.
2 No license, express or implied,by estoppel or otherwise, to any intellectual property rights is granted by this provides this manual as is without warranty of any kind, either expressed or implied, including, butnot limited to, the implied warranties of merchantability and fitness for a particular purpose. StataCorp may makeimprovements and/or changes in the product(s) and the program(s) described in this manual at any time and software described in this manual is furnished under a license agreement or nondisclosure agreement.
3 The softwaremay be copied only in accordance with the terms of the agreement. It is against the law to copy the software ontoDVD, CD, disk, diskette, tape, or any other medium for any purpose other than backup or archival automobile dataset appearing on the accompanying media is Copyrightc 1979 by Consumers Union of ,Inc., Yonkers, NY 10703-1057 and is reproduced by permission from CONSUMER REPORTS, April ,, Stata Press, Mata,, and NetCourse are registered trademarks of StataCorp and Stata Press are registered trademarks with the World Intellectual Property Organization of the United is a trademark of StataCorp brand and product names are registered trademarks or trademarks of their respective copyright information about the software.
4 Typehelp copyrightwithin suggested citation for this software isStataCorp. : Release 17. Statistical Software. College Station, TX: StataCorp basics1 Read this it will help ..22A brief description of Stata ..93 Resources for learning and using Stata ..134 Stata s help and search facilities ..245 Editions of Stata ..316 Managing memory ..347 more conditions ..368 Error messages and return codes ..379 The Break key ..4010 Keyboard use ..42 Elements of Stata11 Language syntax ..4912 Data.
5 8413 Functions and expressions ..12314 Matrix expressions ..14415 Saving and printing output log files ..15916Do-files ..16517 Ado-files ..17818 Programming Stata ..18319 Immediate commands ..23520 Estimation and postestimation commands ..23921 Creating reports ..301 Advice22 Entering and importing data ..30523 Combining datasets ..314iii Contents24 Working with strings ..31625 Working with dates and times ..32026 Working with categorical data and factor variables ..32927 Overview of Stata estimation commands.
6 34728 Commands everyone should know ..38129 Using the Internet to keep up to date ..383 Glossary ..390 Subject and author index ..395 Stata basics1 Read this it will help ..22A brief description of Stata ..93 Resources for learning and using Stata ..134 Stata s help and search facilities ..245 Editions of Stata ..316 Managing memory ..347 more conditions ..368 Error messages and return codes ..379 The Break key ..4010 Keyboard use ..4211 Read this it will Started with Stata .. user s Guide and the Reference manuals.
7 Manuals .. example .. datasets .. example .. index .. subject table of contents .. s new ..82[ U ] 1 Read this it will help 3 The Stata Documentation consists of the following manuals:[GSM]Getting Started with Stata for Mac[GSU]Getting Started with Stata for Unix[GSW]Getting Started with Stata for Windows[U] Stata user s Guide [R] Stata Base Reference Manual[BAYES] Stata Bayesian Analysis Reference Manual[CM] Stata Choice Models Reference Manual[D] Stata Data Management Reference Manual[DSGE] Stata Dynamic Stochastic General Equilibrium Models Reference Manual[ERM] Stata Extended Regression Models Reference Manual[FMM]
8 Stata Finite Mixture Models Reference Manual[FN] Stata Functions Reference Manual[G] Stata Graphics Reference Manual[IRT] Stata Item Response Theory Reference Manual[LASSO] Stata Lasso Reference Manual[XT] Stata Longitudinal-Data/Panel-Data Reference Manual[META] Stata Meta-Analysis Reference Manual[ME] Stata Multilevel Mixed-Effects Reference Manual[MI] Stata Multiple-Imputation Reference Manual[MV] Stata Multivariate Statistics Reference Manual[PSS] Stata Power, Precision, and Sample-Size Reference Manual[P] Stata Programming Reference Manual[RPT] Stata Reporting Reference Manual[SP] Stata Spatial Autoregressive Models Reference Manual[SEM] Stata Structural Equation Modeling Reference Manual[SVY] Stata Survey Data Reference Manual[ST] Stata Survival Analysis Reference Manual[TABLES] Stata Customizable Tables and Collected Results Reference Manual[TS] Stata Time-Series Reference Manual[TE] Stata Treatment-Effects Reference Manual.
9 Potential Outcomes/Counterfactual Outcomes[ I ] Stata Index[M]Mata Reference ManualIn addition, installation instructions may be found in theInstallation [ U ] 1 Read this it will Getting Started with StataThere are threeGetting Startedmanuals:[GSM]Getting Started with Stata for Mac[GSU]Getting Started with Stata for Unix[GSW]Getting Started with Stata for Windows1. Learn how to use Stata read theGetting Started(GSM,GSU, orGSW) Now turn to the other manuals; see[U] The user s Guide and the Reference The user s Guide and the Reference manualsTheUser s Guideis divided into three sections: Stata basics,Elements of Stata , andAdvice.
10 Thetable of contents lists the chapters within each of these sections. Click on the chapter titles to see thedetailed contents of each full of a lot of useful information about Stata ; we recommend that you read it. Ifyou only have time, however, to read one or two chapters, then read[U] 11 Language syntaxand[U] 12 other manuals are theReferencemanuals. The StataReferencemanuals are each arrangedlike an encyclopedia alphabetically. Look at theBase Reference Manual. Look under the name ofa command.