syntax - lane kenworthy...258[g-2] graph twoway lowess— local linear smooth plots notice also the...
Post on 01-Feb-2021
2 Views
Preview:
TRANSCRIPT
-
Title
[G-2] graph twoway lowess — Local linear smooth plots
Syntax Menu Description OptionsRemarks and examples References Also see
Syntaxtwoway lowess yvar xvar
[if] [
in] [
, options]
options Description
bwidth(#) smoothing parametermean use running-mean smoothingnoweight use unweighted smoothinglogit transform the smooth to logitsadjust adjust smooth’s mean to equal yvar’s mean
cline options change look of the line
axis choice options associate plot with alternative axis
twoway options titles, legends, axes, added lines and text, by, regions, name,aspect ratio, etc.
See [G-3] cline options, [G-3] axis choice options, and [G-3] twoway options.
MenuGraphics > Twoway graph (scatter, line, etc.)
Descriptiongraph twoway lowess plots a lowess smooth of yvar on xvar using graph twoway line; see
[G-2] graph twoway line.
Optionsbwidth(#) specifies the bandwidth. bwidth(.8) is the default. Centered subsets of N*bwidth()
observations, N = number of observations, are used for calculating smoothed values for eachpoint in the data except for endpoints, where smaller, uncentered subsets are used. The greater thebwidth(), the greater the smoothing.
mean specifies running-mean smoothing; the default is running-line least-squares smoothing.
noweight prevents the use of Cleveland’s (1979) tricube weighting function; the default is to use theweighting function.
256
-
[G-2] graph twoway lowess — Local linear smooth plots 257
logit transforms the smoothed yvar into logits.
adjust adjusts by multiplication the mean of the smoothed yvar to equal the mean of yvar. This isuseful when smoothing binary (0/1) data.
cline options specify how the lowess line is rendered and its appearance; see [G-3] cline options.
axis choice options associate the plot with a particular y or x axis on the graph; see[G-3] axis choice options.
twoway options are a set of common options supported by all twoway graphs. These options allowyou to title graphs, name graphs, control axes and legends, add lines and text, set aspect ratios,create graphs over by() groups, and change some advanced settings. See [G-3] twoway options.
Remarks and examples
graph twoway lowess yvar xvar uses the lowess command—see [R] lowess—to obtain a locallinear smooth of yvar on xvar and uses graph twoway line to plot the result.
Remarks are presented under the following headings:
Typical useUse with by( )
Typical use
The local linear smooth is often graphed on top of the data, possibly with other regression lines:
. use http://www.stata-press.com/data/r13/auto(1978 Automobile Data)
. twoway scatter mpg weight, mcolor(*.6) ||lfit mpg weight ||lowess mpg weight
10
20
30
40
2,000 3,000 4,000 5,000Weight (lbs.)
Mileage (mpg) Fitted values
lowess mpg weight
Notice our use of mcolor(*.6) to dim the points and thus make the lines stand out; see[G-4] colorstyle.
-
258 [G-2] graph twoway lowess — Local linear smooth plots
Notice also the y-axis title: “Mileage (mpg)/Fitted values/lowess mpg weight”. The “Fitted values”was contributed by twoway lfit and “lowess mpg weight” by twoway lowess. When you overlaygraphs, you nearly always need to respecify the axis titles using the axis title options ytitle() andxtitle(); see [G-3] axis title options.
Use with by( )
graph twoway lowess may be used with by():
. use http://www.stata-press.com/data/r13/auto, clear(1978 Automobile Data)
. twoway scatter mpg weight, mcolor(*.6) ||lfit mpg weight ||lowess mpg weight ||, by(foreign)
10
20
30
40
2,000 3,000 4,000 5,000 2,000 3,000 4,000 5,000
Domestic Foreign
Mileage (mpg) Fitted values
lowess mpg weight
Weight (lbs.)
Graphs by Car type
ReferencesCleveland, W. S. 1979. Robust locally weighted regression and smoothing scatterplots. Journal of the American
Statistical Association 74: 829–836.
Cox, N. J. 2005. Speaking Stata: Smoothing in various directions. Stata Journal 5: 574–593.
. 2010. Software Updates: Speaking Stata: Smoothing in various directions. Stata Journal 10: 164.
Royston, P., and N. J. Cox. 2005. A multivariable scatterplot smoother. Stata Journal 5: 405–412.
Also see[R] lowess — Lowess smoothing[G-2] graph twoway mspline — Twoway median-spline plots
http://www.stata-journal.com/sjpdf.html?articlenum=gr0021http://www.stata-journal.com/sjpdf.html?articlenum=up0027http://www.stata-journal.com/sjpdf.html?articlenum=gr0017
Contents[IG] Installation GuideSimple installationBefore you installStata for Windows installationStata for Mac installationStata for Unix installation
Installing Stata for WindowsUpgrade or update?Upgrading to Stata/MP, Stata/SE, or Stata/ICBefore you installInstallationInitialize the licenseUpdate Stata if necessaryRegister your copyCreating network shortcutsOther ways to start StataExiting StataVerifying installation
Installing Stata for MacUpgrade or update?Upgrading to Stata/MP, Stata/SE, or Stata/ICWarning against multiple Stata applicationsBefore you installInstallationInitialize the licenseUpdate Stata if necessaryRegister your copyOther ways to start StataExiting Stata
Installing Stata for UnixInstallation overviewFind your installation DVD and paper licenseObtain superuser accessCreate a directory for StataUpgradingInstall StataInitialize the licenseSet the message of the day (optional)Verify that Stata is workingModify shell start-up scriptUpdate Stata if necessaryStarting StataExiting StataTroubleshooting Unix installationTroubleshooting Unix start-upStata(console) starts but Stata(GUI) does not
Platforms and flavorsAvailable platformsAvailable flavors
Documentation
[GS] Getting Started[GSM] MacContents1 Introducing Stata---sample sessionIntroducing StataSample sessionSimple data managementDescriptive statisticsA simple hypothesis testDescriptive statistics---correlation matricesGraphing dataModel fitting: Linear regressionCommands versus menusKeeping track of your workConclusion
2 The Stata user interfaceThe windowsThe toolbarThe Command windowThe Results windowThe Review windowThe Variables windowThe Properties windowMenus and dialogsThe working directory
3 Using the ViewerThe Viewer's purposeViewer buttonsViewer's functionViewing local text files, including SMCL filesViewing remote files over the InternetNavigating within the ViewerPrintingTabs in the ViewerRight-clicking on the Viewer windowSearching for help in the ViewerCommands in the ViewerUsing the Viewer from the Command window
4 Getting helpSystem helpSearching helpHelp and search commandsThe Stata reference manuals and User's GuideThe Stata Journal and the Stata Technical BulletinStata videos
5 Opening and saving Stata datasetsHow to load your dataset from disk and save it to disk
6 Using the Data EditorThe Data EditorButtons on the Data EditorData entryNotes on data entryRenaming and formatting variablesCopying and pasting dataNotes on copying and pastingChanging dataWorking with snapshotsDates and the Data EditorData Editor adviceFiltering and hidingBrowse mode
7 Using the Variables ManagerThe Variables ManagerThe Variable paneRight-clicking on the Variable paneThe Variable Properties paneManaging notes
8 Importing dataCopying and pastingCommands for importing dataThe import delimited commandImporting files from other software
9 Labeling dataMaking data readableThe dataset structure: The describe commandLabeling datasets and variablesLabeling values of variables
10 Listing data and basic command syntaxCommand syntaxlist with a variable listlist with iflist with if, common mistakeslist with inControlling the list outputMoreBreak
11 Creating new variablesgenerate and replacegeneratereplacegenerate with string variables
12 Deleting variables and observationsclear, drop, and keepclear and drop _alldropkeep
13 Using the Do-file Editor---automating StataThe Do-file EditorThe Do-file Editor toolbarUsing the Do-file EditorThe File menuThe Edit menuThe View > Do-file Editor menuSaving interactive commands from Stata as a do-fileProjects
14 Graphing dataWorking with graphsA simple graph exampleGraph windowSaving and printing graphsRight-clicking on the Graph windowThe Graph button
15 Editing graphsThe Graph Editor
16 Saving and printing results by using logsUsing logs in StataLogging outputWorking with logsPrinting logsRerunning commands as do-files
17 Setting font and window preferencesChanging and saving fonts and sizes and positions of your windowsGraph windowAll other windowsChanging color schemesManaging multiple sets of preferencesClosing and opening windows
18 Learning more about StataWhere to go from hereSuggested reading from the User's Guide and reference manualsInternet resources
19 Updating and extending Stata---Internet functionalityInternet functionality in StataUsing files from the InternetOfficial Stata updatesAutomatic update checkingFinding user-written programs by keywordDownloading user-written programs
A Troubleshooting StataA.1 If Stata does not startA.2 Troubleshooting tips
B Advanced Stata usageB.1 Executing commands every time Stata is startedB.2 Other ways to launch StataB.3 Stata batch modeB.4 Memory size considerations
C More on Stata for MacC.1 Using Stata datasets and graphs created on other platformsC.2 Exporting a Stata graph to another documentC.3 Stata and the Notification ManagerC.4 Stata(console) for Mac OS X
Subject indexABCDEFGHIJKLMNOPRSTUVWXY
[GSU] UnixContents1 Introducing Stata---sample sessionIntroducing StataSample sessionSimple data managementDescriptive statisticsA simple hypothesis testDescriptive statistics---correlation matricesGraphing dataModel fitting: Linear regressionCommands versus menusKeeping track of your workConclusion
2 The Stata user interfaceThe windowsThe toolbarThe Command windowThe Results windowThe Review windowThe Variables windowThe Properties windowMenus and dialogsThe working directory
3 Using the ViewerThe Viewer in Stata(GUI)The Viewer's purposeViewer buttonsViewer's functionViewing local text files, including SMCL filesViewing remote files over the InternetNavigating within the ViewerPrintingTabs in the ViewerRight-clicking on the Viewer windowSearching for help in the ViewerCommands in the ViewerUsing the Viewer from the Command window
4 Getting helpSystem helpSearching helpHelp and search commandsThe Stata reference manuals and User's GuideThe Stata Journal and the Stata Technical BulletinStata videos
5 Opening and saving Stata datasetsHow to load your dataset from disk and save it to disk
6 Using the Data EditorThe Data Editor in Stata(GUI)Buttons on the Data EditorData entryNotes on data entryRenaming and formatting variablesCopying and pasting dataNotes on copying and pastingChanging dataWorking with snapshotsDates and the Data EditorData Editor adviceFiltering and hidingBrowse mode
7 Using the Variables ManagerThe Variables Manager in Stata(GUI)The Variable paneRight-clicking on the Variable paneThe Variable Properties paneManaging notes
8 Importing dataCopying and pasting in Stata(GUI)Commands for importing dataThe import delimited commandImporting files from other software
9 Labeling dataMaking data readableThe dataset structure: The describe commandLabeling datasets and variablesLabeling values of variables
10 Listing data and basic command syntaxCommand syntaxlist with a variable listlist with iflist with if, common mistakeslist with inControlling the list outputMoreBreak
11 Creating new variablesgenerate and replacegeneratereplacegenerate with string variables
12 Deleting variables and observationsclear, drop, and keepclear and drop _alldropkeep
13 Using the Do-file Editor---automating StataThe Do-file Editor in Stata(GUI)The Do-file Editor toolbarUsing the Do-file EditorThe File menuThe Edit menuThe View menuThe Tools menuSaving interactive commands from Stata as a do-fileProjects
14 Graphing dataWorking with graphsA simple graph exampleGraph windowSaving and printing graphsRight-clicking on the Graph windowThe Graph button
15 Editing graphsThe Graph Editor
16 Saving and printing results by using logsUsing logs in StataLogging outputWorking with logsPrinting logsRerunning commands as do-files
17 Setting font and window preferencesChanging and saving fonts and sizes and positions of your windowsGraph windowAll other windowsChanging color schemesManaging multiple sets of preferencesClosing and opening windows
18 Learning more about StataWhere to go from hereSuggested reading from the User's Guide and reference manualsInternet resources
19 Updating and extending Stata---Internet functionalityInternet functionality in StataUsing files from the InternetOfficial Stata updatesFinding user-written programs by keywordDownloading user-written programs
A Troubleshooting StataA.1 If Stata(GUI) and Stata(console) do not startA.2 If Stata(console) starts but Stata(GUI) does notA.3 Troubleshooting tips
B Advanced Stata usageB.1 Executing commands every time Stata is startedB.2 Advanced starting of Stata for UnixB.3 Stata batch modeB.4 Using X Windows remotelyB.5 Summary of environment variablesB.6 Memory size considerations
C Stata manual pages for UnixconrenSyntaxDescriptionFinding a color schemeCan your terminal underline?If you had successIf you did not have successAlso see
stataSyntaxDescriptionRemarks and examples
Subject indexABCDEFGHIKLMNOPRSTUVWXY
[GSW] WindowsContents1 Introducing Stata---sample sessionIntroducing StataSample sessionSimple data managementDescriptive statisticsA simple hypothesis testDescriptive statistics---correlation matricesGraphing dataModel fitting: Linear regressionCommands versus menusKeeping track of your workConclusion
2 The Stata user interfaceThe windowsThe toolbarThe Command windowThe Results windowThe Review windowThe Variables windowThe Properties windowMenus and dialogsThe working directoryFine control of Stata's windowsWindow typesDocking windowsAuto Hide and pinningNondocking windows
3 Using the ViewerThe Viewer's purposeViewer buttonsViewer's functionViewing local text files, including SMCL filesViewing remote files over the InternetNavigating within the ViewerPrintingTabs in the ViewerRight-clicking on the Viewer windowSearching for help in the ViewerCommands in the ViewerUsing the Viewer from the Command window
4 Getting helpSystem helpSearching helpHelp and search commandsThe Stata reference manuals and User's GuideThe Stata Journal and the Stata Technical BulletinStata videos
5 Opening and saving Stata datasetsHow to load your dataset from disk and save it to disk
6 Using the Data EditorThe Data EditorButtons on the Data EditorData entryNotes on data entryRenaming and formatting variablesCopying and pasting dataNotes on copying and pastingChanging dataWorking with snapshotsDates and the Data EditorData Editor adviceFiltering and hidingBrowse mode
7 Using the Variables ManagerThe Variables ManagerThe Variable paneRight-clicking on the Variable paneThe Variable Properties paneManaging notes
8 Importing dataCopying and pastingCommands for importing dataThe import delimited commandImporting files from other software
9 Labeling dataMaking data readableThe dataset structure: The describe commandLabeling datasets and variablesLabeling values of variables
10 Listing data and basic command syntaxCommand syntaxlist with a variable listlist with iflist with if, common mistakeslist with inControlling the list outputMoreBreak
11 Creating new variablesgenerate and replacegeneratereplacegenerate with string variables
12 Deleting variables and observationsclear, drop, and keepclear and drop _alldropkeep
13 Using the Do-file Editor---automating StataThe Do-file EditorThe Do-file Editor toolbarUsing the Do-file EditorThe File menuThe Edit menuThe View menuThe Tools menuSaving interactive commands from Stata as a do-fileProjects
14 Graphing dataWorking with graphsA simple graph exampleGraph windowSaving and printing graphsRight-clicking on the Graph windowThe Graph button
15 Editing graphsThe Graph Editor
16 Saving and printing results by using logsUsing logs in StataLogging outputWorking with logsPrinting logsRerunning commands as do-files
17 Setting font and window preferencesChanging and saving fonts and sizes and positions of your windowsGraph windowAll other windowsChanging color schemesManaging multiple sets of preferencesClosing and opening windows
18 Learning more about StataWhere to go from hereSuggested reading from the User's Guide and reference manualsInternet resources
19 Updating and extending Stata---Internet functionalityInternet functionality in StataUsing files from the InternetOfficial Stata updatesAutomatic update checkingFinding user-written programs by keywordDownloading user-written programs
A Troubleshooting StataA.1 If Stata does not startA.2 Troubleshooting tips
B Advanced Stata usageB.1 The Windows Properties SheetB.2 Making shortcutsB.3 Executing commands every time Stata is startedB.4 Other ways to launch StataB.5 Stata batch modeB.6 Running simultaneous Stata sessionsB.7 Memory size considerations
C More on Stata for WindowsC.1 Using Stata datasets and graphs created on other platformsC.2 Exporting a Stata graph to another documentC.3 Installing Stata for Windows on a network driveC.4 Changing a Stata for Windows license
Subject indexABCDEFGHIKLMNOPRSTUVWXY
[U] User's GuideContentsStata basics1 Read this---it will help1.1 Getting Started with Stata1.2 The User's Guide and the Reference manuals1.3 What's new1.4 References
2 A brief description of Stata2.1 Video example
3 Resources for learning and using Stata3.1 Overview3.2 Stata on the Internet (www.stata.com and other resources)3.3 Stata Press3.4 The Stata forum3.5 The Stata Journal3.6 Updating and adding features from the web3.7 Conferences and training3.8 Books and other support materials3.9 Technical support
4 Stata's help and search facilities4.1 Introduction4.2 Getting started4.3 help: Stata's help system4.4 Accessing PDF manuals from help entries4.5 Searching4.6 More on search4.7 More on help4.8 search: All the details4.9 net search: Searching net resources
5 Flavors of Stata5.1 Platforms5.2 Stata/MP, Stata/SE, Stata/IC, and Small Stata5.3 Size limits of Stata/MP, SE, IC, and Small Stata5.4 Speed comparison of Stata/MP, SE, IC, and Small Stata5.5 Feature comparison of Stata/MP, SE, and IC
6 Managing memory6.1 Memory-size considerations6.2 Compressing data6.3 Setting maxvar6.4 Setting matsize6.5 The memory command
7 --more-- conditions7.1 Description7.2 set more off7.3 The more programming command
8 Error messages and return codes8.1 Making mistakes8.2 The return message for obtaining command timings
9 The Break key9.1 Making Stata stop what it is doing9.2 Side effects of clicking on Break9.3 Programming considerations
10 Keyboard use10.1 Description10.2 F-keys10.3 Editing keys in Stata10.4 Editing keys in Stata for Unix(console)10.5 Editing previous lines in Stata10.6 Tab expansion of variable names
Elements of Stata11 Language syntax11.1 Overview11.2 Abbreviation rules11.3 Naming conventions11.4 varlists11.5 by varlist: construct11.6 Filenaming conventions11.7 References
12 Data12.1 Data and datasets12.2 Numbers12.3 Dates and times12.4 Strings12.5 Formats: Controlling how data are displayed12.6 Dataset, variable, and value labels12.7 Notes attached to data12.8 Characteristics12.9 Data Editor and Variables Manager12.10 References
13 Functions and expressions13.1 Overview13.2 Operators13.3 Functions13.4 System variables (_variables)13.5 Accessing coefficients and standard errors13.6 Accessing results from Stata commands13.7 Explicit subscripting13.8 Indicator values for levels of factor variables13.9 Time-series operators13.10 Label values13.11 Precision and problems therein13.12 References
14 Matrix expressions14.1 Overview14.2 Row and column names14.3 Vectors and scalars14.4 Inputting matrices by hand14.5 Accessing matrices created by Stata commands14.6 Creating matrices by accumulating data14.7 Matrix operators14.8 Matrix functions14.9 Subscripting14.10 Using matrices in scalar expressions14.11 Reference
15 Saving and printing output---log files15.1 Overview15.2 Placing comments in logs15.3 Logging only what you type15.4 The log-button alternative15.5 Printing logs15.6 Creating multiple log files for simultaneous use
16 Do-files16.1 Description16.2 Calling other do-files16.3 Creating and running do-files16.4 Programming with do-files16.5 References
17 Ado-files17.1 Description17.2 What is an ado-file?17.3 How can I tell if a command is built in or an ado-file?17.4 How can I look at an ado-file?17.5 Where does Stata look for ado-files?17.6 How do I install an addition?17.7 How do I add my own ado-files?17.8 How do I install official updates?17.9 How do I install updates to user-written additions?17.10 Reference
18 Programming Stata18.1 Description18.2 Relationship between a program and a do-file18.3 Macros18.4 Program arguments18.5 Scalars and matrices18.6 Temporarily destroying the data in memory18.7 Temporary objects18.8 Accessing results calculated by other programs18.9 Accessing results calculated by estimation commands18.10 Storing results18.11 Ado-files18.12 Tools for interacting with programs outside Stata and with other languages18.13 A compendium of useful commands for programmers18.14 References
19 Immediate commands19.1 Overview19.2 The display command19.3 The power command
20 Estimation and postestimation commands20.1 All estimation commands work the same way20.2 Standard syntax20.3 Replaying prior results20.4 Cataloging estimation results20.5 Saving estimation results20.6 Specifying the estimation subsample20.7 Specifying the width of confidence intervals20.8 Formatting the coefficient table20.9 Obtaining the variance--covariance matrix20.10 Obtaining predicted values20.11 Accessing estimated coefficients20.12 Performing hypothesis tests on the coefficients20.13 Obtaining linear combinations of coefficients20.14 Obtaining nonlinear combinations of coefficients20.15 Obtaining marginal means, adjusted predictions, and predictive margins20.16 Obtaining conditional and average marginal effects20.17 Obtaining pairwise comparisons20.18 Obtaining contrasts, tests of interactions, and main effects20.19 Graphing margins, marginal effects, and contrasts20.20 Dynamic forecasts and simulations20.21 Obtaining robust variance estimates20.22 Obtaining scores20.23 Weighted estimation20.24 A list of postestimation commands20.25 References
Advice21 Entering and importing data21.1 Overview21.2 Determining which method to use21.3 If you run out of memory21.4 Transfer programs21.5 ODBC sources21.6 Reference
22 Combining datasets22.1 References
23 Working with strings23.1 Description23.2 Categorical string variables23.3 Mistaken string variables23.4 Complex strings23.5 Reference
24 Working with dates and times24.1 Overview24.2 Inputting dates and times24.3 Displaying dates and times24.4 Typing dates and times (datetime literals)24.5 Extracting components of dates and times24.6 Converting between date and time values24.7 Business dates and calendars24.8 References
25 Working with categorical data and factor variables25.1 Continuous, categorical, and indicator variables25.2 Estimation with factor variables
26 Overview of Stata estimation commands26.1 Introduction26.2 Means, proportions, and related statistics26.3 Linear regression with simple error structures26.4 Structural equation modeling (SEM)26.5 ANOVA, ANCOVA, MANOVA, and MANCOVA26.6 Generalized linear models26.7 Binary-outcome qualitative dependent-variable models26.8 ROC analysis26.9 Conditional logistic regression26.10 Multiple-outcome qualitative dependent-variable models26.11 Count dependent-variable models26.12 Exact estimators26.13 Linear regression with heteroskedastic errors26.14 Stochastic frontier models26.15 Regression with systems of equations26.16 Models with endogenous sample selection26.17 Models with time-series data26.18 Panel-data models26.19 Multilevel mixed-effects models26.20 Survival-time (failure-time) models26.21 Treatment-effect models26.22 Generalized method of moments (GMM)26.23 Estimation with correlated errors26.24 Survey data26.25 Multiple imputation26.26 Multivariate and cluster analysis26.27 Pharmacokinetic data26.28 Specification search tools26.29 Power and sample-size analysis26.30 Obtaining new estimation commands26.31 References
27 Commands everyone should know27.1 41 commands27.2 The by construct
28 Using the Internet to keep up to date28.1 Overview28.2 Sharing datasets (and other files)28.3 Official updates28.4 Downloading and managing additions by users28.5 Making your own download site
Subject and author indexSymbolsABCDEFGHIJKLMNOPQRSTUVWY
[D] Data ManagementContentsintroDescriptionRemarks and examplesWhat's new
Also see
data managementDescriptionReferenceAlso see
appendSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
assertSyntaxDescriptionOptionsRemarks and examplesAlso see
bcalSyntaxMenuDescriptionOption for bcal checkOptions for bcal createRemarks and examplesStored resultsAlso see
bySyntaxDescriptionOptionsRemarks and examplesReferencesAlso see
cdSyntaxDescriptionRemarks and examplesStata for WindowsStata for MacStata for Unix
Also see
cfSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsMethods and formulasAcknowledgmentReferenceAlso see
changeeolSyntaxDescriptionOptionsRemarks and examplesAlso see
checksumSyntaxDescriptionOptionsRemarks and examplesStored resultsAlso see
clearSyntaxDescriptionRemarks and examplesAlso see
clonevarSyntaxMenuDescriptionRemarks and examplesAcknowledgmentsAlso see
codebookSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsReferencesAlso see
collapseSyntaxMenuDescriptionOptionsRemarks and examplesIntroductory examplesVariablewise or casewise deletionWeightsA final example
AcknowledgmentAlso see
compareSyntaxMenuDescriptionRemarks and examplesAlso see
compressSyntaxMenuDescriptionOptionRemarks and examplesAlso see
contractSyntaxMenuDescriptionOptionsRemarks and examplesAcknowledgmentsReferenceAlso see
copySyntaxDescriptionOptionsRemarks and examplesAlso see
corr2dataSyntaxMenuDescriptionOptionsRemarks and examplesMethods and formulasReferenceAlso see
countSyntaxMenuDescriptionRemarks and examplesStored resultsReferencesAlso see
crossSyntaxMenuDescriptionRemarks and examplesReferencesAlso see
data typesDescriptionRemarks and examplesPrecision of numeric storage types
Also see
datasignatureSyntaxMenuDescriptionOptionsRemarks and examplesUsing datasignature interactivelyUsing datasignature in do-filesInterpreting data signaturesThe logic of data signatures
Stored resultsMethods and formulasReferenceAlso see
datetimeSyntaxTypes of dates and their human readable forms (HRFs)Stata internal form (SIF)HRF-to-SIF conversion functionsDisplaying SIFs in HRFBuilding SIFs from componentsSIF-to-SIF conversionExtracting time-of-day components from SIFsExtracting date components from SIFsConveniently typing SIF valuesObtaining and working with durationsUsing dates and times from other software
DescriptionRemarks and examplesReferencesAlso see
datetime business calendarsSyntaxDescriptionRemarks and examplesStep 1: Read the data, date as stringStep 2: Convert date variable to %td dateStep 3: Convert %td date to %tb dateKey feature: Each business calendar has its own encodingKey feature: Omitted dates really are omittedKey feature: Extracting components from %tb datesKey feature: Merging on dates
Also see
datetime business calendars creationSyntaxDescriptionRemarks and examplesIntroductionConceptsThe preliminary commandsThe omit commands: from/to and ifThe omit commands: andThe omit commands: omit dateThe omit commands: omit dayofweekThe omit commands: omit dowinmonthCreating stbcal-files with bcal createWhere to place stbcal-filesHow to debug stbcal-filesIdeas for calendars that may not occur to you
Also see
datetime display formatsSyntaxDescriptionRemarks and examplesSpecifying display formatsTimes are truncated, not rounded, when displayed
Also see
datetime translationSyntaxDescriptionRemarks and examplesIntroductionSpecifying the maskHow the HRF-to-SIF functions interpret the maskWorking with two-digit yearsWorking with incomplete dates and timesTranslating run-together dates, such as 20060125Valid timesThe clock() and Clock() functionsWhy there are two SIF datetime encodingsAdvice on using datetime/c and datetime/CDetermining when leap seconds occurredThe date() functionThe other translation functions
Also see
describeSyntaxMenuDescriptionOptions to describe data in memoryOptions to describe data in fileRemarks and examplesdescribedescribe, replace
Stored resultsReferencesAlso see
destringSyntaxMenuDescriptionOptions for destringOptions for tostringRemarks and examplesdestringtostringSaved characteristics
AcknowledgmentReferencesAlso see
dirSyntaxDescriptionOptionRemarks and examplesAlso see
drawnormSyntaxMenuDescriptionOptionsRemarks and examplesMethods and formulasReferencesAlso see
dropSyntaxMenuDescriptionRemarks and examplesReferenceAlso see
dsSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsAcknowledgmentsReferencesAlso see
duplicatesSyntaxMenuDescriptionOptionsOptions for duplicates examples and duplicates listOption for duplicates tagOption for duplicates drop
Remarks and examplesAcknowledgmentsReferencesAlso see
editSyntaxMenuDescriptionOptionRemarks and examplesModesThe current observation and current variableAssigning value labels to variablesChanging values of existing cellsAdding new variablesAdding new observationsCopying and pastingLogging changesAdvice
ReferencesAlso see
egenSyntaxMenuDescriptionRemarks and examplesSummary statisticsGenerating patternsMarking differences among variablesRanksStandardized variablesRow functionsCategorical and integer variablesString variablesU.S. marginal income tax rate
Methods and formulasAcknowledgmentsReferencesAlso see
encodeSyntaxMenuDescriptionOptions for encodeOptions for decodeRemarks and examplesencodedecode
ReferenceAlso see
eraseSyntaxDescriptionRemarks and examplesAlso see
expandSyntaxMenuDescriptionOptionRemarks and examplesReferenceAlso see
expandclSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
exportDescriptionRemarks and examplesSummary of the different methodsexport excelexport delimitedodbcoutfileexport sasxportxmlsave
Also see
filefilterSyntaxDescriptionOptionsRemarks and examplesStored resultsReferenceAlso see
fillinSyntaxMenuDescriptionRemarks and examplesReferencesAlso see
formatSyntaxMenuDescriptionOptionRemarks and examplesSetting formatsSetting European formatsDetails of formatsOther effects of formatsDisplaying current formats
ReferencesAlso see
functionsDescriptionMathematical functionsabs()acos()acosh()asin()asinh()atan()atan2()atanh()ceil()cloglog()comb()cos()cosh()digamma()exp()floor()int()invcloglog()invlogit()ln()lnfactorial()lngamma()log()log10()logit()max()min()mod()reldif()round()sign()sin()sinhh()sqrt()sum()tan()tanh()trigamma()trunc()
Probability distributions and density functionsBeta and noncentral beta distributionsibeta()betaden()ibetatail()invibeta()invibetatail()nibeta()invnibeta()Binomial distributionbinomial()binomialp()binomialtail()invbinomial()invbinomialtail()Chi-squared and noncentral chi-squared distributionschi2()chi2den()chi2tail()invchi2()invchi2tail()nchi2()nchi2den()nchi2tail()invnchi2()invnchi2tail()npnchi2()Dunnett's multiple range distributiondunnettprob()invdunnettprob()F and noncentral F distributionsF()Fden()Ftail()invF()invFtail()nF()nFtail()invnFtail()npnF()Gamma distributiongammap()gammaden()gammaptail()invgammap()invgammaptail()dgammapda()dgammapdada()dgammapdadx()dgammapdx()dgammapdxdx()Hypergeometric distributionhypergeometric()hypergeometricp()Negative binomial distributionnbinomial()nbinomialp()nbinomialtail()invnbinomial()invnbinomiailtail()Normal (Gaussian), log of the normal, and binormal distributionsbinormal()normal()normalden()invnormal()lnnormal()Poisson distributionpoisson()poissonp()poissontail()invpoisson()invpoissontail()Student's t and noncentral Student's t distributionst()tden()ttail()invt()invttail()nt()ntden()nttail()invnttail()npnt()Tukey's Studentized range distributiontukeyprob()invtukeyprob()
Random-number functionsruniform()rbeta()rbinomial()rchi2()rgamma()rhypergeometric()rnbinomial()rnormal()rpoisson()rt()
String functionsabbrev()char()indexnot()itrim()length()lower()ltrim()plural()proper()real()regexm()regexr()regexs()reverse()rtrim()soundex()soundex_nara()strcat()strdup()string()strlen()strlower()strltrim()strmatch()strofreal()strpos()strproper()strreverse()strrtrim()strtoname()strtrim()strupper()subinstr()subinword()substr()trim()upper()word()wordcount()
Programming functionsautocode()byteorder()c()_caller()chop()clip()cond()e()e(sample)epsdouble()epsfloat()fileexists()fileread()filereaderror()filewrite()float()fmtwidth()has_eprop()inlist()inrange()irecode()matrix()maxbyte()maxdouble()maxfloat()maxint()maxlong()mi()minbyte()mindouble()minfloat()minint()minlong()missing()r()recode()replay()return()s()scalar()smallestdouble()
Date and time functionsbofd()Cdhms()clock()Cmdyhms()Cofc()cofC()Cofd()cofd()daily()date()day()dhms()dofb()dofC()dofc()dofh()dofm()dofq()dofw()dofy()dow()doy()halfyear()halfyearly()hh()hhC()hms()hofd()hours()mdy()mdyhms()minutes()mm()mmC()mofd()month()monthly()msofhours()msofminutes()msofseconds()qofd()quarter()quarterly()seconds()ss()ssC()tC()tc()td()th()tm()tq()tw()week()weekly()wofd()year()yearly()yh()ym()yofd()yq()yw()
Selecting time spanstin()
Matrix functions returning a matrixcholesky()corr()diag()get()hadamard()I()inv()invsym()J()matuniform()nullmat()sweep()vec()vecdiag()
Matrix functions returning a scalarcolsof()det()diag0cnt()el()issymmetric()matmissing()mreldif()rownumb()rowsof()trace()
AcknowledgmentsReferencesAlso see
generateSyntaxMenuDescriptionOptionsRemarks and examplesgenerate and replaceset type
Methods and formulasReferencesAlso see
gsortSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
hexdumpSyntaxDescriptionOptionsRemarks and examplesStored resultsAlso see
icd9SyntaxMenuDescriptionOptionsOptions for icd9 checkOptions for icd9 cleanOptions for icd9 generateOption for icd9 search
Remarks and examplesDescriptions
Stored resultsReference
importDescriptionRemarks and examplesSummary of the different methodsimport excelimport delimitedodbcinfile (free format){---}infile without a dictionaryinfix (fixed format)infile (fixed format){---}infile with a dictionaryimport sasxportimport haver (Windows only)xmluse
ExamplesVideo example
ReferenceAlso see
import delimitedSyntaxMenuDescriptionOptions for import delimitedOptions for export delimitedRemarks and examplesimport delimitedexport delimited
Also see
import excelSyntaxMenuDescriptionOptions for import excelOptions for export excelRemarks and examplesVideo example
Stored resultsReferencesAlso see
import haverSyntaxMenuDescriptionOptions for import haverOptions for import haver, describeOption for set haverdirRemarks and examplesInstallationSetting the path to Haver databasesDownload example Haver databasesDetermining the contents of a Haver databaseLoading a Haver databaseLoading a Haver database from a describe fileTemporal aggregationDaily dataWeekly data
Stored resultsAcknowledgmentAlso see
import sasxportSyntaxMenuDescriptionOptions for import sasxportOption for import sasxport, describeOptions for export sasxportRemarks and examplesSaving XPORT files for transferring to SASDetermining the contents of XPORT files received from SASUsing XPORT files received from SAS
Stored resultsTechnical appendixA1. Overview of SAS XPORT Transport formatA2. Implications for writing XPORT datasets from StataA3. Implications for reading XPORT datasets into Stata
Also see
infile (fixed format)SyntaxMenuDescriptionOptionsDictionary directives
Remarks and examplesIntroductionReading free-format filesReading fixed-format filesNumeric formatsString formatsSpecifying column and line numbersExamples of reading fixed-format filesReading fixed-block filesReading EBCDIC files
ReferencesAlso see
infile (free format)SyntaxMenuDescriptionOptionsRemarks and examplesReading free-format dataReading comma-separated dataSpecifying variable typesReading string variablesSkipping variablesSkipping observationsReading time-series data
Also see
infix (fixed format)SyntaxMenuDescriptionOptionsSpecifications
Remarks and examplesTwo ways to use infixReading string variablesReading data with multiple lines per observationReading subsets of observations
Also see
inputSyntaxDescriptionOptionsRemarks and examplesReferenceAlso see
inspectSyntaxMenuDescriptionRemarks and examplesStored resultsAlso see
ipolateSyntaxMenuDescriptionOptionsRemarks and examplesMethods and formulasReferenceAlso see
isidSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
joinbySyntaxMenuDescriptionOptionsRemarks and examplesAcknowledgmentReferenceAlso see
labelSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsReferencesAlso see
label languageSyntaxMenuDescriptionOptionRemarks and examplesCreating labels in the first languageCreating labels in the second and subsequent languagesCreating labels from a clean slateCreating labels from a previously existing languageSwitching languagesChanging the name of a languageDeleting a languageAppendix: Selected ISO 639-1 two-letter codes
Stored resultsMethods and formulasReferencesAlso see
labelbookSyntaxMenuDescriptionOptionsOptions for labelbookOptions for numlabelOptions for uselabel
Remarks and exampleslabelbookDiagnosing problemsnumlabeluselabel
Stored resultsAcknowledgmentsReferencesAlso see
listSyntaxMenuDescriptionOptionsRemarks and examplesReferencesAlso see
lookforSyntaxDescriptionRemarks and examplesStored resultsReferencesAlso see
memorySyntaxDescriptionOptionsRemarks and examplesExamplesSerious bug in Linux OSNotes for system administrators
Stored resultsReferenceAlso see
mergeSyntaxMenuDescriptionOptionsRemarks and examplesOverviewBasic description1:1 mergesm:1 merges1:m mergesm:m mergesSequential mergesTreatment of overlapping variablesSort orderTroubleshooting m:m mergesExamples
ReferencesAlso see
missing valuesDescriptionRemarks and examplesReferenceAlso see
mkdirSyntaxDescriptionOptionRemarks and examplesAlso see
mvencodeSyntaxMenuDescriptionOptionsRemarks and examplesAcknowledgmentAlso see
notesSyntaxMenuDescriptionRemarks and examplesHow notes are numberedAttaching and listing notesSelectively listing notesSearching and replacing notesDeleting notesWarnings
ReferencesAlso see
obsSyntaxDescriptionRemarks and examplesAlso see
odbcSyntaxMenuDescriptionOptionsRemarks and examplesSetting up the data sourcesListing ODBC data source namesListing available table names from a specified data source's system catalogDescribing a specified tableLoading data from ODBC sources
Also see
orderSyntaxMenuDescriptionOptionsRemarks and examplesReferencesAlso see
outfileSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
pctileSyntaxMenuDescriptionOptionsRemarks and examplespctilextile_pctile
Stored resultsMethods and formulasAcknowledgmentAlso see
putmataSyntaxDescriptionOptions for putmataOptions for getmataRemarks and examplesUse of putmataUse of putmata and getmataUsing putmata and getmata on subsets of observationsUsing viewsConstructing do-files
Stored resultsReferenceAlso see
rangeSyntaxMenuDescriptionRemarks and examplesAlso see
recastSyntaxDescriptionOptionRemarks and examplesAlso see
recodeSyntaxMenuDescriptionOptionsRemarks and examplesSimple examplesSetting up value labels with recodeReferring to the minimum and maximum in rulesRecoding missing valuesRecoding subsets of the dataOtherwise rulesTest for overlapping rules
AcknowledgmentAlso see
renameSyntaxMenuDescriptionRemarks and examplesReferencesAlso see
rename groupSyntaxMenuDescriptionOptions for renaming variablesOptions for changing the case of groups of variable namesRemarks and examplesAdviceExplanation* matches 0 or more characters; use ?* to match 1 or more* is greedy# is greedier
Stored resultsAlso see
reshapeSyntaxMenuDescriptionOptionsRemarks and examplesDescription of basic syntaxWide and long data formsAvoiding and correcting mistakesreshape long and reshape wide without argumentsMissing variablesAdvanced issues with basic syntax: i()Advanced issues with basic syntax: j()Advanced issues with basic syntax: xijAdvanced issues with basic syntax: String identifiers for j()Advanced issues with basic syntax: Second-level nestingDescription of advanced syntax
Stored resultsAcknowledgmentReferencesAlso see
rmdirSyntaxDescriptionRemarks and examplesAlso see
sampleSyntaxMenuDescriptionOptionsRemarks and examplesReferencesAlso see
saveSyntaxMenuDescriptionOptions for saveOptions for saveoldRemarks and examplesAlso see
separateSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsAcknowledgmentReferenceAlso see
shellSyntaxDescriptionRemarks and examplesStata for WindowsStata for MacStata for Unix(GUI)Stata for Unix(console)
Also see
snapshotSyntaxMenuDescriptionOptionRemarks and examplesStored resultsAlso see
sortSyntaxMenuDescriptionOptionRemarks and examplesReferencesAlso see
splitSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsAcknowledgmentsAlso see
stackSyntaxMenuDescriptionOptionsRemarks and examplesReferenceAlso see
statsbySyntaxMenuDescriptionOptionsRemarks and examplesCollecting coefficients and standard errorsCollecting stored resultsAll subsets
AcknowledgmentReferencesAlso see
sysuseSyntaxMenuDescriptionOptionsRemarks and examplesTypical useA note concerning shipped datasetsUsing user-installed datasetsHow sysuse works
Stored resultsAlso see
typeSyntaxDescriptionOptionsRemarks and examplesAlso see
useSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
varmanageSyntaxMenuDescriptionRemarks and examplesAlso see
webuseSyntaxMenuDescriptionOptionRemarks and examplesTypical useA note concerning example datasetsRedirecting the source
Also see
xmlsaveSyntaxMenuDescriptionOptions for xmlsaveOptions for xmluseRemarks and examplesAlso see
xposeSyntaxMenuDescriptionOptionsRemarks and examplesMethods and formulasReferencesAlso see
zipfileSyntaxDescriptionOption for zipfileOption for unzipfileRemarks and examples
Subject and author indexSymbolsABCDEFGHIJKLMNOPQRSTUVWXYZ
[G] GraphicsContentsIntroductionintroDescriptionRemarks and examplesWhat's new
Also see
graph introRemarks and examplesSuggested reading orderA quick tourUsing the menus
ReferencesAlso see
graph editorRemarks and examplesQuick startIntroductionStarting and stopping the Graph EditorThe toolsThe Object BrowserRight-click menus, or Contextual menusThe Standard ToolbarThe main Graph Editor menuGrid editingGraph RecorderTips, tricks, and quick edits
Also see
CommandsgraphSyntaxDescriptionRemarks and examplesAlso see
graph barSyntaxMenuDescriptionOptionsgroup_optionsyvar_optionslookofbar_optionslegending_optionsaxis_optionstitle_and_other_optionsSuboptions for use with over() and yvaroptions()
Remarks and examplesIntroductionExamples of syntaxTreatment of barsTreatment of dataMultiple bars (overlapping the bars)Controlling the text of the legendMultiple over()s (repeating the bars)Nested over()sCharts with many categoriesHow bars are orderedReordering the barsPutting the bars in a prespecified orderPutting the bars in height orderPutting the bars in a derived orderReordering the bars, exampleUse with by()Video exampleHistory
ReferencesAlso see
graph boxSyntaxMenuDescriptionOptionsgroup_optionsyvar_optionsboxlook_optionslegending_optionsaxis_optionstitle_and_other_optionsSuboptions for use with over() and yvaroptions()
Remarks and examplesIntroductionExamples of syntaxTreatment of multiple yvars versus treatment of over() groupsHow boxes are orderedReordering the boxesPutting the boxes in a prespecified orderPutting the boxes in median orderUse with by()Video exampleHistory
Methods and formulasReferencesAlso see
graph combineSyntaxDescriptionOptionsRemarks and examplesTypical useTypical use with memory graphsCombining twoway graphsAdvanced useControlling the aspect ratio of subgraphs
ReferenceAlso see
graph copySyntaxMenuDescriptionOptionRemarks and examplesAlso see
graph describeSyntaxMenuDescriptionRemarks and examplesStored resultsAlso see
graph dirSyntaxDescriptionOptionsRemarks and examplesStored resultsAlso see
graph displaySyntaxMenuDescriptionOptionsRemarks and examplesChanging the size and aspect ratioChanging the margins and aspect ratioChanging the scheme
Also see
graph dotSyntaxMenuDescriptionOptionsgroup_optionsyvar_optionslinelook_optionslegending_optionsaxis_optionstitle_and_other_optionsSuboptions for use with over() and yvaroptions()
Remarks and examplesRelationship between dot plots and horizontal bar chartsExamplesAppendix: Examples of syntax
ReferencesAlso see
graph dropSyntaxMenuDescriptionRemarks and examplesTypical useRelationship between graph drop _all and discardErasing graphs on disk
Also see
graph exportSyntaxDescriptionOptionsRemarks and examplesExporting the graph displayed in a Graph windowExporting a graph stored on diskExporting a graph stored in memory
Also see
graph manipulationSyntaxDescriptionRemarks and examplesOverview of graphs in memory and graphs on diskSummary of graph manipulation commands
Also see
graph matrixSyntaxMenuDescriptionOptionsRemarks and examplesTypical useMarker symbols and the number of observationsControlling the axes labelingAdding grid linesAdding titlesUse with by()History
ReferencesAlso see
graph otherSyntaxDescriptionRemarks and examplesAlso see
graph pieSyntaxMenuDescriptionOptionsRemarks and examplesTypical useData are summedData may be long rather than wideHow slices are orderedOrdering slices by sizeReordering the slicesUse with by()Video exampleHistory
ReferencesAlso see
graph playSyntaxDescriptionRemarks and examplesAlso see
graph printSyntaxDescriptionOptionsRemarks and examplesPrinting the graph displayed in a Graph windowPrinting a graph stored on diskPrinting a graph stored in memoryAppendix: Setting up Stata for Unix to print graphs
Also see
graph querySyntaxMenuDescriptionRemarks and examplesAlso see
graph renameSyntaxMenuDescriptionOptionRemarks and examplesAlso see
graph saveSyntaxDescriptionOptionsRemarks and examplesAlso see
graph setSyntaxDescriptionRemarks and examplesOverviewSetting defaults
Also see
graph twowaySyntaxMenuDescriptionRemarks and examplesDefinitionSyntaxMultiple if and in restrictionstwoway and plot options
graph twoway areaSyntaxMenuDescriptionOptionsRemarks and examplesTypical useAdvanced useCautions
Also see
graph twoway barSyntaxMenuDescriptionOptionsRemarks and examplesTypical useAdvanced use: OverlayingAdvanced use: Population pyramidCautions
Also see
graph twoway connectedSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
graph twoway contourSyntaxMenuDescriptionOptionsRemarks and examplesControlling the number of contours and their valuesControlling the colors of the contour areasChoose the interpolation methodVideo example
ReferenceAlso see
graph twoway contourlineSyntaxMenuDescriptionOptionsRemarks and examplesControlling the number of contour lines and their valuesControlling the colors of the contour linesChoose the interpolation method
Also see
graph twoway dotSyntaxMenuDescriptionOptionsRemarks and examplesReferenceAlso see
graph twoway droplineSyntaxMenuDescriptionOptionsRemarks and examplesTypical useAdvanced useCautions
Also see
graph twoway fpfitSyntaxMenuDescriptionOptionsRemarks and examplesTypical useCautionsUse with by()
Also see
graph twoway fpfitciSyntaxMenuDescriptionOptionsRemarks and examplesTypical useAdvanced useCautionsUse with by()
Also see
graph twoway functionSyntaxMenuDescriptionOptionsRemarks and examplesTypical useAdvanced use 1Advanced use 2
ReferenceAlso see
graph twoway histogramSyntaxMenuDescriptionOptions for use in the discrete caseOptions for use in the continuous caseOptions for use in both casesRemarks and examplesRelationship between graph twoway histogram and histogramTypical useUse with by()History
ReferencesAlso see
graph twoway kdensitySyntaxMenuDescriptionOptionsRemarks and examplesTypical useUse with by()
ReferencesAlso see
graph twoway lfitSyntaxMenuDescriptionOptionsRemarks and examplesTypical useCautionsUse with by()
Also see
graph twoway lfitciSyntaxMenuDescriptionOptionsRemarks and examplesTypical useAdvanced useCautionsUse with by()
Also see
graph twoway lineSyntaxMenuDescriptionOptionsRemarks and examplesOneway equivalency of line and scatterTypical useAdvanced useCautions
Also see
graph twoway lowessSyntaxMenuDescriptionOptionsRemarks and examplesTypical useUse with by()
ReferencesAlso see
graph twoway lpolySyntaxMenuDescriptionOptionsRemarks and examplesTypical useUse with by()
ReferencesAlso see
graph twoway lpolyciSyntaxMenuDescriptionOptionsRemarks and examplesTypical useUse with by()
Also see
graph twoway mbandSyntaxMenuDescriptionOptionsRemarks and examplesTypical useUse with by()
Also see
graph twoway msplineSyntaxMenuDescriptionOptionsRemarks and examplesTypical useCautionsUse with by()
Also see
graph twoway pcarrowSyntaxMenuDescriptionOptionsRemarks and examplesBasic useAdvanced use
ReferencesAlso see
graph twoway pcarrowiSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
graph twoway pccapsymSyntaxMenuDescriptionOptionsRemarks and examplesBasic use 1Basic use 2
Also see
graph twoway pciSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
graph twoway pcscatterSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
graph twoway pcspikeSyntaxMenuDescriptionOptionsRemarks and examplesBasic useAdvanced useAdvanced use 2
ReferenceAlso see
graph twoway qfitSyntaxMenuDescriptionOptionsRemarks and examplesTypical useCautionsUse with by()
Also see
graph twoway qfitciSyntaxMenuDescriptionOptionsRemarks and examplesTypical useAdvanced useCautionsUse with by()
Also see
graph twoway rareaSyntaxMenuDescriptionOptionsRemarks and examplesTypical useAdvanced useCautions
Also see
graph twoway rbarSyntaxMenuDescriptionOptionsRemarks and examplesTypical useAdvanced use
ReferenceAlso see
graph twoway rcapSyntaxMenuDescriptionOptionsRemarks and examplesTypical useAdvanced useAdvanced use 2
Also see
graph twoway rcapsymSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
graph twoway rconnectedSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
graph twoway rlineSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
graph twoway rscatterSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
graph twoway rspikeSyntaxMenuDescriptionOptionsRemarks and examplesTypical useAdvanced useAdvanced use 2
Also see
graph twoway scatterSyntaxMenuDescriptionOptionsRemarks and examplesTypical useScatter syntaxThe overall look for the graphThe size and aspect ratio of the graphTitlesAxis titlesAxis labels and tickingGrid linesAdded linesAxis rangeLog scalesMultiple axesMarkersWeighted markersJittered markersConnected linesGraphs by groupsSaving graphsVideo exampleAppendix: Styles and composite styles
ReferencesAlso see
graph twoway scatteriSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
graph twoway spikeSyntaxMenuDescriptionOptionsRemarks and examplesTypical useAdvanced useCautions
Also see
graph twoway tslineSyntaxMenuDescriptionAlso see
graph useSyntaxDescriptionOptionsRemarks and examplesAlso see
paletteSyntaxDescriptionOptionsRemarks and examplesAlso see
set graphicsSyntaxDescriptionRemarks and examplesAlso see
set printcolorSyntaxDescriptionOptionRemarks and examplesWhat set printcolor affectsThe problem set printcolor solvesset printcolor automaticset printcolor asisset printcolor gs1, gs2, and gs3The scheme matters, not the background color you set
Also see
set schemeSyntaxDescriptionOptionRemarks and examplesAlso see
Optionsadded_line_optionsSyntaxDescriptionOptionsSuboptions
Remarks and examplesTypical useInterpretation of repeated options
ReferenceAlso see
added_text_optionsSyntaxDescriptionOptionsSuboptions
Remarks and examplesTypical useAdvanced useUse of the textbox option width()
ReferenceAlso see
addplot_optionSyntaxDescriptionOptionRemarks and examplesCommands that allow the addplot() optionAdvantage of graph twoway commandsAdvantages of graphic commands implemented outside graph twowayUse of the addplot() option
Also see
advanced_optionsSyntaxDescriptionOptionsRemarks and examplesUse of yvarlabel() and xvarlabel()Use of yvarformat() and xvarformat()Use of recast()
Also see
area_optionsSyntaxDescriptionOptionsRemarks and examplesUse with twowayUse with graph dot
Also see
aspect_optionSyntaxDescriptionOptionSuboptionRemarks and examplesReferenceAlso see
axis_choice_optionsSyntaxDescriptionOptionsRemarks and examplesUsual case: one set of axesSpecial case: multiple axes due to multiple scalesyaxis(1) and xaxis(1) are the defaultsNotation style is irrelevantyaxis() and xaxis() are plot optionsSpecifying the other axes options with multiple axesEach plot may have at most one x scale and one y scaleSpecial case: Multiple axes with a shared scale
ReferenceAlso see
axis_label_optionsSyntaxDescriptionOptionsSuboptions
Remarks and examplesDefault labeling and tickingControlling the labeling and tickingAdding extra ticksAdding minor labels and ticksAdding grid linesSuppressing grid linesSubstituting text for labelsContour axes---zlabel(), etc.Appendix: Details of syntax
ReferenceAlso see
axis_optionsSyntaxDescriptionOptionsRemarks and examplesUse of axis-appearance options with graph twowayMultiple y and x scalesAxis on the left, axis on the right?Contour axes---zscale(), zlabel(), etc.
Also see
axis_scale_optionsSyntaxDescriptionOptionsSuboptions
Remarks and examplesUse of the yscale() and xscale()Specifying the range of a scaleObtaining log scalesObtaining reversed scalesSuppressing the axesContour axes---zscale()
ReferencesAlso see
axis_title_optionsSyntaxDescriptionOptionsSuboptions
Remarks and examplesDefault axis titlesOverriding default titlesSpecifying multiline titlesSuppressing axis titlesInterpretation of repeated optionsTitles with multiple y axes or multiple x axesContour axes---ztitle()
Also see
barlook_optionsSyntaxDescriptionOptionsRemarks and examplesAlso see
blabel_optionSyntaxDescriptionOptionSuboptions
Remarks and examplesIncreasing the information contentChanging how bars are labeled
Also see
by_optionSyntaxDescriptionOptionbyoptsRemarks and examplesTypical usePlacement of graphsTreatment of titlesby() uses subtitle() with graphPlacement of the subtitle()by() uses the overall note()Use of legends with by()By-stylesLabeling the edgesSpecifying separate scales for the separate plotsHistory
ReferencesAlso see
cat_axis_label_optionsSyntaxDescriptionOptionsRemarks and examplesAlso see
cat_axis_line_optionsSyntaxDescriptionOptionsRemarks and examplesAlso see
clegend_optionSyntaxDescriptionOptionContent and appearance suboptions for use with clegend()Suboptions for use with clegend(region())Location suboptions for use with clegend()
Remarks and examplesWhen contour legends appearWhere contour legends appearPutting titles on contour legendsControlling the axis in contour legendsUse of legends with by()
Also see
cline_optionsSyntaxDescriptionOptionsRemarks and examplesAlso see
connect_optionsSyntaxDescriptionOptionsRemarks and examplesAlso see
eps_optionsSyntaxDescriptionOptionsRemarks and examplesUsing the eps_optionsSetting defaultsNote about PostScript fonts
Also see
fcline_optionsSyntaxDescriptionOptionsRemarks and examples
fitarea_optionsSyntaxDescriptionOptionsRemarks and examples
legend_optionsSyntaxDescriptionOptionsContent suboptions for use with legend() and plegend()Suboptions for use with legend(region())Location suboptions for use with legend()
Remarks and examplesWhen legends appearThe contents of legendsWhere legends appearPutting titles on legendsUse of legends with by()Problems arising with or because of legends
Also see
line_optionsSyntaxDescriptionOptionsRemarks and examplesAlso see
marker_label_optionsSyntaxDescriptionOptionsRemarks and examplesTypical useEliminating overprinting and overrunsAdvanced useUsing marker labels in place of markers
Also see
marker_optionsSyntaxDescriptionOptionsRemarks and examplesAlso see
name_optionSyntaxDescriptionOptionRemarks and examplesAlso see
nodraw_optionSyntaxDescriptionOptionRemarks and examplesAlso see
play_optionSyntaxDescriptionOptionRemarks and examplesAlso see
png_optionsSyntaxDescriptionOptionsRemarks and examplesUsing png_optionsSpecifying the width or height
Also see
pr_optionsSyntaxDescriptionOptionsRemarks and examplesUsing the pr_optionsSetting defaultsNote for Unix users
Also see
ps_optionsSyntaxDescriptionOptionsRemarks and examplesUsing the ps_optionsSetting defaultsNote about PostScript fontsNote for Unix users
Also see
rcap_optionsSyntaxDescriptionOptionsRemarks and examplesAlso see
region_optionsSyntaxDescriptionOptionsSuboptions
Remarks and examplesSetting the offset between the axes and the plot regionControlling the aspect ratioSuppressing the border around the plot regionSetting background and fill colorsHow graphs are constructed
Also see
rspike_optionsSyntaxDescriptionOptionsRemarks and examplesAlso see
saving_optionSyntaxDescriptionOptionSuboptions
Remarks and examplesAlso see
scale_optionSyntaxDescriptionOptionRemarks and examplesAlso see
scheme_optionSyntaxDescriptionOptionRemarks and examplesAlso see
std_optionsSyntaxDescriptionOptionsRemarks and examplesAlso see
textbox_optionsSyntaxDescriptionOptionsRemarks and examplesDefinition of a textboxPositionJustificationPosition and justification combinedMarginsWidth and heightAppendix: Overriding default or context-specified positioning
Also see
tif_optionsSyntaxDescriptionOptionsRemarks and examplesUsing tif_optionsSpecifying the width or height
Also see
title_optionsSyntaxDescriptionOptionsSuboptions
Remarks and examplesMultiple-line titlesInterpretation of repeated optionsPositioning of titlesAlignment of titlesSpanningUsing the textbox options box and bexpand
ReferenceAlso see
twoway_optionsSyntaxDescriptionOptionsRemarks and examplesAlso see
Styles/concepts/schemesaddedlinestyleSyntaxDescriptionRemarks and examplesWhat is an added line?What is an addedlinestyle?You do not need to specify an addedlinestyle
Also see
alignmentstyleSyntaxDescriptionRemarks and examplesAlso see
anglestyleSyntaxDescriptionRemarks and examplesAlso see
areastyleSyntaxDescriptionRemarks and examplesOverview of areastylesNumbered stylesUsing numbered stylesWhen to use areastyles
Also see
axisstyleSyntaxDescriptionRemarks and examplesAlso see
bystyleSyntaxDescriptionRemarks and examplesWhat is a by-graph?What is a bystyle?
Also see
clockposstyleSyntaxDescriptionRemarks and examplesAlso see
colorstyleSyntaxDescriptionRemarks and examplesColors are independent of the background colorWhite backgrounds and black backgroundsRGB valuesCMYK valuesHSV valuesAdjusting intensity
Also see
compassdirstyleSyntaxDescriptionRemarks and examplesAlso see
concept: gph filesDescriptionRemarks and examplesBackgroundGph files are machine/operating system independentGph files come in three formsAdvantages of live-format filesAdvantages of as-is format filesRetrieving data from live-format files
Also see
concept: linesSyntaxDescriptionRemarks and exampleslinestylelinepatternstylelinewidthstylecolorstyle
Also see
concept: repeated optionsSyntaxRemarks and examplesAlso see
connectstyleSyntaxDescriptionRemarks and examplesAlso see
gridstyleSyntaxDescriptionRemarks and examplesWhat is a grid?What is a gridstyle?You do not need to specify a gridstyleTurning off and on the grid
Also see
intensitystyleSyntaxDescriptionRemarks and examplesAlso see
justificationstyleSyntaxDescriptionRemarks and examplesAlso see
legendstyleSyntaxDescriptionRemarks and examplesWhat is a legend?What is a legendstyle?You do not need to specify a legendstyle
Also see
linepatternstyleSyntaxDescriptionRemarks and examplesAlso see
linestyleSyntaxDescriptionRemarks and examplesWhat is a line?What is a linestyle?You do not need to specify a linestyleSpecifying a linestyle can be convenientWhat are numbered styles?Suppressing lines
ReferenceAlso see
linewidthstyleSyntaxDescriptionRemarks and examplesAlso see
marginstyleSyntaxDescriptionRemarks and examplesAlso see
markerlabelstyleSyntaxDescriptionRemarks and examplesWhat is a markerlabel?What is a markerlabelstyle?You do not need to specify a markerlabelstyleSpecifying a markerlabelstyle can be convenientWhat are numbered styles?
Also see
markersizestyleSyntaxDescriptionRemarks and examplesAlso see
markerstyleSyntaxDescriptionRemarks and examplesWhat is a marker?What is a markerstyle?You do not have to specify a markerstyleSpecifying a markerstyle can be convenientWhat are numbered styles?
Also see
orientationstyleSyntaxDescriptionRemarks and examplesAlso see
plotregionstyleSyntaxDescriptionRemarks and examplesAlso see
pstyleSyntaxDescriptionRemarks and examplesWhat is a plot?What is a pstyle?The pstyle() optionSpecifying a pstyleWhat are numbered styles?
Also see
relativesizeSyntaxDescriptionRemarks and examplesAlso see
ringposstyleSyntaxDescriptionRemarks and examplesAlso see
schemes introSyntaxDescriptionRemarks and examplesThe role of schemesFinding out about other schemesSetting your default schemeThe scheme is applied at display timeBackground colorForeground colorObtaining new schemesExamples of schemes
Also see
scheme economistSyntaxDescriptionRemarks and examplesAlso see
scheme s1SyntaxDescriptionRemarks and examplesAlso see
scheme s2SyntaxDescriptionRemarks and examplesAlso see
scheme sjSyntaxDescriptionRemarks and examplesAlso see
shadestyleSyntaxDescriptionRemarks and examplesWhat is a shadestyle?What are numbered styles?
Also see
stylelistsSyntaxDescriptionAlso see
symbolstyleSyntaxDescriptionRemarks and examplesTypical useFilled and hollow symbolsSize of symbols
Also see
textDescriptionRemarks and examplesOverviewBold and italicsSuperscripts and subscriptsFonts, standardFonts, advancedGreek letters and other symbolsFull list of SMCL tags useful in graph text
Also see
textboxstyleSyntaxDescriptionRemarks and examplesWhat is a textbox?What is a textboxstyle?You do not need to specify a textboxstyle
Also see
textsizestyleSyntaxDescriptionAlso see
textstyleSyntaxDescriptionRemarks and examplesWhat is text?What is a textstyle?You do not need to specify a textstyleRelationship between textstyles and textboxstyles
Also see
ticksetstyleSyntaxDescriptionAlso see
tickstyleSyntaxDescriptionRemarks and examplesWhat is a tick? What is a tick label?What is a tickstyle?You do not need to specify a tickstyleSuppressing ticks and/or tick labels
Also see
Subject and author indexABCDEFGHIJKLMNOPQRSTUVWXYZ
[ME] Multilevel Mixed EffectsContentsmeSyntax by exampleFormal syntaxDescriptionRemarks and examplesIntroductionUsing mixed-effects commandsMixed-effects modelsLinear mixed-effects modelsGeneralized linear mixed-effects models
Alternative mixed-effects model specificationLikelihood calculationComputation time and the Laplacian approximationDiagnosing convergence problemsDistribution theory for likelihood-ratio test
ExamplesTwo-level modelsCovariance structuresThree-level modelsCrossed-effects models
AcknowledgmentsReferencesAlso see
mecloglogSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionTwo-level modelsThree-level models
Stored resultsMethods and formulasReferencesAlso see
mecloglog postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estat groupMenu for estatRemarks and examplesMethods and formulasAlso see
meglmSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionTwo-level models for continuous responsesTwo-level models for nonlinear responsesThree-level models for nonlinear responsesCrossed-effects modelsObtaining better starting values
Stored resultsMethods and formulasIntroductionGauss--Hermite quadratureAdaptive Gauss--Hermite quadratureLaplacian approximation
ReferencesAlso see
meglm postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estat groupMenu for estatRemarks and examplesMethods and formulasReferencesAlso see
melogitSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionTwo-level modelsThree-level models
Stored resultsMethods and formulasReferencesAlso see
melogit postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estatMenu for estatOption for estat iccRemarks and examplesStored resultsMethods and formulasPredictionIntraclass correlations
Also see
menbregSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionTwo-level models
Stored resultsMethods and formulasReferencesAlso see
menbreg postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estat groupMenu for estatRemarks and examplesMethods and formulasAlso see
meologitSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionTwo-level modelsThree-level models
Stored resultsMethods and formulasReferencesAlso see
meologit postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estat groupMenu for estatRemarks and examplesMethods and formulasAlso see
meoprobitSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionTwo-level modelsThree-level models
Stored resultsMethods and formulasReferencesAlso see
meoprobit postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estat groupMenu for estatRemarks and examplesMethods and formulasAlso see
mepoissonSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionA two-level modelA three-level model
Stored resultsMethods and formulasReferencesAlso see
mepoisson postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estat groupMenu for estatRemarks and examplesMethods and formulasAlso see
meprobitSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionTwo-level modelsThree-level models
Stored resultsMethods and formulasReferencesAlso see
meprobit postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estatMenu for estatOption for estat iccRemarks and examplesStored resultsMethods and formulasPredictionIntraclass correlations
Also see
meqrlogitSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionTwo-level modelsOther covariance structuresThree-level modelsCrossed-effects models
Stored resultsMethods and formulasReferencesAlso see
meqrlogit postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estatMenu for estatOptions for estat recovarianceOption for estat iccRemarks and examplesStored resultsMethods and formulasPredictionIntraclass correlations
ReferencesAlso see
meqrpoissonSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionA two-level modelA three-level model
Stored resultsMethods and formulasReferencesAlso see
meqrpoisson postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estatMenu for estatOptions for estat recovarianceRemarks and examplesStored resultsMethods and formulasReferencesAlso see
mixedSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionTwo-level modelsCovariance structuresLikelihood versus restricted likelihoodThree-level modelsBlocked-diagonal covariance structuresHeteroskedastic random effectsHeteroskedastic residual errorsOther residual-error structuresCrossed-effects modelsDiagnosing convergence problemsSurvey data
Stored resultsMethods and formulasAcknowledgmentsReferencesAlso see
mixed postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estatMenu for estatOption for estat iccOptions for estat recovarianceOptions for estat wcorrelationRemarks and examplesStored resultsMethods and formulasPredictionIntraclass correlationsWithin-cluster covariance matrix
ReferencesAlso see
GlossarySubject and author indexABCDEFGHIJKLMNOPQRSTUVWYZ
[MI] Multiple ImputationContentsintro substantiveDescriptionRemarks and examplesMotivating exampleWhat is multiple imputation?Theory underlying multiple imputationHow large should M be?Assumptions about missing dataPatterns of missing dataProper imputation methodsAnalysis of multiply imputed dataA brief introduction to MI using StataSummary
ReferencesAlso see
introSyntaxDescriptionRemarks and examplesA simple exampleSuggested reading orderWhat's new
AcknowledgmentsAlso see
estimationDescriptionAlso see
mi addSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsAlso see
mi appendSyntaxMenuDescriptionOptionsRemarks and examplesAdding new observationsAdding new observations and imputationsAdding new observations and imputations, M unequalTreatment of registered variables
Stored resultsAlso see
mi convertSyntaxMenuDescriptionOptionsRemarks and examplesUsing mi convert as a convenience toolConverting from flongsepConverting to flongsep
Also see
mi copySyntaxMenuDescriptionOptionRemarks and examplesAlso see
mi describeSyntaxMenuDescriptionOptionsRemarks and examplesmi querymi describe
Stored resultsAlso see
mi eraseSyntaxMenuDescriptionOptionRemarks and examplesAlso see
mi estimateSyntaxMenuDescriptionOptionsRemarks and examplesUsing mi estimateExample 1: Completed-data logistic analysisExample 2: Completed-data linear regression analysisExample 3: Completed-data survival analysisExample 4: Panel data and multilevel modelsExample 5: Estimating transformationsExample 6: Monte Carlo error estimatesPotential problems that can arise when using mi estimate
Stored resultsMethods and formulasUnivariate caseMultivariate case
AcknowledgmentsReferencesAlso see
mi estimate usingSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsMethods and formulasReferencesAlso see
mi estimate postestimationDescriptionRemarks and examplesUsing the command-specific postestimation tools
Also see
mi expandSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
mi exportSyntaxDescriptionRemarks and examplesReferencesAlso see
mi export iceSyntaxMenuDescriptionOptionRemarks and examplesReferencesAlso see
mi export nhanes1SyntaxMenuDescriptionOptionsRemarks and examplesAlso see
mi extractSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
mi importSyntaxDescriptionRemarks and examplesWhen to use which mi import commandImport data into Stata before importing into miUsing mi import nhanes1, ice, flong, and flongsep
ReferencesAlso see
mi import flongSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
mi import flongsepSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
mi import iceSyntaxMenuDescriptionOptionsRemarks and examplesReferencesAlso see
mi import nhanes1SyntaxMenuDescriptionOptionsRemarks and examplesDescription of the nhanes1 formatImporting nhanes1 data
Also see
mi import wideSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
mi imputeSyntaxMenuDescriptionOptionsRemarks and examplesImputation methodsImputation modelingModel buildingOutcome variablesTransformationsCategorical variablesThe issue of perfect prediction during imputation of categorical dataConvergence of iterative methodsImputation diagnostics
Using mi imputeUnivariate imputationMultivariate imputationImputing on subsamplesConditional imputationImputation and estimation samplesImputing transformations of incomplete variables
Stored resultsMethods and formulasReferencesAlso see
mi impute chainedSyntaxMenuDescriptionOptionsRemarks and examplesMultivariate imputation using chained equationsCompatibility of conditionalsConvergence of MICEFirst useUsing mi impute chainedDefault prediction equationsCustom prediction equationsLink between mi impute chained and mi impute monotoneExamples
Stored resultsMethods and formulasAcknowledgmentsReferencesAlso see
mi impute intregSyntaxMenuDescriptionOptionsRemarks and examplesUnivariate imputation using interval regressionUsing mi impute intregExample
Stored resultsMethods and formulasReferenceAlso see
mi impute logitSyntaxMenuDescriptionOptionsRemarks and examplesUnivariate imputation using logistic regressionUsing mi impute logitVideo example
Stored resultsMethods and formulasReferencesAlso see
mi impute mlogitSyntaxMenuDescriptionOptionsRemarks and examplesUnivariate imputation using multinomial logistic regressionUsing mi impute mlogit
Stored resultsMethods and formulasReferencesAlso see
mi impute monotoneSyntaxMenuDescriptionOptionsRemarks and examplesMultivariate imputation when a missing-data pattern is monotoneFirst useUsing mi impute monotoneDefault syntax of mi impute monotoneThe alternative syntax of mi impute monotone---custom prediction equationsExamples of using default prediction equationsExamples of using custom prediction equations
Stored resultsMethods and formulasReferencesAlso see
mi impute mvnSyntaxMenuDescriptionOptionsRemarks and examplesIncomplete continuous data with arbitrary pattern of missing valuesMultivariate imputation using data augmentationConvergence of the MCMC methodUsing mi impute mvnExamples
Stored resultsMethods and formulasData augmentationPrior distributionInitial values: EM algorithm Worst linear function
ReferencesAlso see
mi impute nbregSyntaxMenuDescriptionOptionsRemarks and examplesUnivariate imputation using negative binomial regressionUsing mi impute nbreg
Stored resultsMethods and formulasReferenceAlso see
mi impute ologitSyntaxMenuDescriptionOptionsRemarks and examplesUnivariate imputation using ordered logistic regressionUsing mi impute ologit
Stored resultsMethods and formulasReferencesAlso see
mi impute pmmSyntaxMenuDescriptionOptionsRemarks and examplesUnivariate imputation using predictive mean matchingUsing mi impute pmmVideo example
Stored resultsMethods and formulasReferencesAlso see
mi impute poissonSyntaxMenuDescriptionOptionsRemarks and examplesUnivariate imputation using Poisson regressionUsing mi impute poisson
Stored resultsMethods and formulasReferencesAlso see
mi impute regressSyntaxMenuDescriptionOptionsRemarks and examplesUnivariate imputation using linear regressionUsing mi impute regressVideo example
Stored resultsMethods and formulasReferencesAlso see
mi impute truncregSyntaxMenuDescriptionOptionsRemarks and examplesUnivariate imputation using truncated regressionUsing mi impute truncreg
Stored resultsMethods and formulasReferencesAlso see
mi mergeSyntaxMenuDescriptionOptionsRemarks and examplesMerging with non-mi dataMerging with mi dataMerging with mi data containing overlapping variables
Stored resultsAlso see
mi misstableSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsAlso see
mi passiveSyntaxMenuDescriptionOptionsRemarks and examplesmi passive basicsmi passive works with the by prefixmi passive works fastest with the wide stylemi passive and super-varying variablesRenaming passive variablesDropping passive variablesUpdate passive variables when imputed values changeAlternatives to mi passive
Also see
mi predictSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionUsing mi predict and mi predictnlExample 1: Obtain MI linear predictions and other statisticsExample 2: Obtain MI linear predictions for the estimation sampleExample 3: Obtain MI estimates of probabilitiesExample 4: Obtain other MI predictionsExample 5: Obtain MI predictions after multiple-equation commands
Methods and formulasReferencesAlso see
mi ptraceSyntaxDescriptionOptionsRemarks and examplesStored resultsAlso see
mi renameSyntaxMenuDescriptionOptionRemarks and examplesSpecifying the noupdate optionWhat to do if you accidentally use renameWhat to do if you accidentally use rename on wide dataWhat to do if you accidentally use rename on mlong dataWhat to do if you accidentally use rename on flong dataWhat to do if you accidentally use rename on flongsep data
Also see
mi replace0SyntaxMenuDescriptionOptionRemarks and examplesAlso see
mi resetSyntaxMenuDescriptionOptionsRemarks and examplesUsing mi resetTechnical notes and relation to mi update
Also see
mi reshapeSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
mi selectSyntaxDescriptionOptionRemarks and examplesStored resultsAlso see
mi setSyntaxMenuDescriptionRemarks and examplesmi set stylemi register and mi unregistermi set M and mi set mmi unset
Also see
mi stsplitSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
mi testSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionOverviewExample 1: Testing subsets of coefficients equal to zeroExample 2: Testing linear hypothesesExample 3: Testing nonlinear hypotheses
Stored resultsMethods and formulasReferencesAlso see
mi updateSyntaxMenuDescriptionRemarks and examplesPurpose of mi updateWhat mi update doesmi update is run automatically
Also see
mi varyingSyntaxMenuDescriptionOptionsRemarks and examplesDetecting problemsFixing problems
Stored resultsAlso see
mi xeqSyntaxDescriptionRemarks and examplesUsing mi xeq with reporting commandsUsing mi xeq with data-modification commandsUsing mi xeq with data-modification commands on flongsep data
Stored resultsAlso see
mi XXXsetSyntaxDescriptionRemarks and examplesAlso see
noupdate optionSyntaxDescriptionOptionRemarks and examplesAlso see
stylesSyntaxDescriptionRemarks and examplesThe four stylesStyle wide
Style flongStyle mlongStyle flongsepHow we constructed this example
Using mi system variablesAdvice for using flongsep
Also see
technicalDescriptionRemarks and examplesNotationDefinition of stylesStyle allStyle wideStyle mlongStyle flongStyle flongsepStyle flongsep_sub
Adding new commands to miOutline for new commandsUtility routinesu_mi_assert_setu_mi_certify_datau_mi_no_sys_vars and u_mi_no_wide_varsu_mi_zap_charsu_mi_xeq_on_tmp_flongsepu_mi_get_flongsep_tmpnamemata: u_mi_flongsep_erase()u_mi_sortbacku_mi_save and u_mi_usemata: u_mi_wide_swapvars()u_mi_fixcharsmata: u_mi_cpchars_get() and mata: u_mi_cpchars_put()mata: u_mi_get_mata_instanced_var()mata: u_mi_ptrace_*()
How to write other set commands to work with mi
Also see
workflowDescriptionRemarks and examplesSuggested workflow for original dataSuggested workflow for data that already have imputationsExample
Also see
GlossaryAlso see
Subject and author indexABCDEFGHIJKLMNOPQRSTUVWX
[MV] Multivariate StatisticsContentsintroDescriptionRemarks and examplesWhat's new
Also see
multivariateDescriptionRemarks and examplesCluster analysisDiscriminant analysisFactor analysis and principal component analysisRotationMultivariate analysis of variance and related techniquesStructural equation modelingMultidimensional scaling and biplotsCorrespondence analysis
Also see
alphaSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsMethods and formulasAcknowledgmentReferencesAlso see
biplotSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsMethods and formulasAcknowledgmentReferencesAlso see
caSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionA first exampleHow many dimensions?Statistics on the pointsNormalization and interpretation of correspondence analysisPlotting the pointsSupplementary pointsMatrix inputCrossed variables
Stored resultsMethods and formulasReferencesAlso see
ca postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estatMenu for estatOptions for estatRemarks and examplesPostestimation statisticsPredicting new variables
Stored resultsMethods and formulasReferencesAlso see
ca postestimation plotsDescriptioncabiplotSyntax for cabiplotMenu for cabiplotDescription for cabiplotOptions for cabiplot
caprojectionSyntax for caprojectionMenu for caprojectionDescription for caprojectionOptions for caprojection
Remarks and examplesReferencesAlso see
candiscSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsMethods and formulasReferencesAlso see
canonSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsMethods and formulasAcknowledgmentReferencesAlso see
canon postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estatMenu for estatOption for estatRemarks and examplesStored resultsMethods and formulasReferencesAlso see
clusterSyntaxDescriptionRemarks and examplesIntroduction to cluster analysisStata's cluster-analysis systemData transformations and variable selectionSimilarity and dissimilarity measuresPartition cluster-analysis methodsHierarchical cluster-analysis methodsHierarchical cluster analysis applied to a dissimilarity matrixPostclustering commandsCluster-management tools
ReferencesAlso see
clustermatSyntaxDescriptionRemarks and examplesReferencesAlso see
cluster dendrogramSyntaxMenuDescriptionOptionsRemarks and examplesReferenceAlso see
cluster generateSyntaxMenuDescriptionOptionsRemarks and examplesAlso see
cluster kmeans and kmediansSyntaxMenuDescriptionOptionsRemarks and examplesMethods and formulasReferenceAlso see
cluster linkageSyntaxMenuDescriptionOptions for cluster linkage commandsOptions for clustermat linkage commandsRemarks and examplesMethods and formulasAlso see
cluster notesSyntaxMenuDescriptionRemarks and examplesAlso see
cluster programming subroutinesDescriptionRemarks and examplesAdding a cluster subroutineAdding a cluster generate functionAdding a cluster stopping ruleApplying an alternate cluster dendrogram routine
ReferenceAlso see
cluster programming utilitiesSyntaxDescriptionOptions for cluster setOptions for cluster deleteOptions for cluster measuresRemarks and examplesStored resultsAlso see
cluster stopSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsMethods and formulasReferencesAlso see
cluster utilitySyntaxMenuDescriptionOptions for cluster listOptions for cluster renamevarRemarks and examplesAlso see
discrimSyntaxDescriptionRemarks and examplesIntroductionA simple examplePrior probabilities, costs, and ties
Methods and formulasReferencesAlso see
discrim estatDescriptionSpecial-interest postestimation commands
SyntaxMenu for estatOptions for estat classtableOptions for estat errorrateOptions for estat grsummarizeOptions for estat listOptions for estat summarizeRemarks and examplesDiscriminating-variable summariesDiscrimination listingsClassification tables and error rates
Stored resultsMethods and formulasReferencesAlso see
discrim knnSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionA first exampleMahalanobis transformationBinary data
Stored resultsMethods and formulasReferencesAlso see
discrim knn postestimationDescriptionSyntax for predictMenu for predictOptions for predictRemarks and examplesMethods and formulasAlso see
discrim ldaSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionDescriptive LDAPredictive LDAA classic example
Stored resultsMethods and formulasPredictive LDADescriptive LDA
ReferencesAlso see
discrim lda postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estatMenu for estatOptions for estatOptions for estat classfunctionsOptions for estat correlationsOptions for estat covarianceOptions for estat grdistancesOptions for estat grmeansOptions for estat loadingsOption for estat structure
Remarks and examplesClassification tables, error rates, and listingsANOVA, MANOVA, and canonical correlationsDiscriminant and classification functionsScree, loading, and score plotsMeans and distancesCovariance and correlation matricesPredictions
Stored resultsMethods and formulasReferencesAlso see
discrim logisticSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsMethods and formulasReferencesAlso see
discrim logistic postestimationDescriptionSyntax for predictMenu for predictOptions for predictRemarks and examplesReferenceAlso see
discrim qdaSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsMethods and formulasReferencesAlso see
discrim qda postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estatMenu for estatOptions for estatOptions for estat correlationsOptions for estat covarianceOptions for estat grdistances
Remarks and examplesStored resultsMethods and formulasReferencesAlso see
factorSyntaxMenuDescriptionOptions for factor and factormatOptions unique to factormatRemarks and examplesIntroductionFactor analysisFactor analysis from a correlation matrix
Stored resultsMethods and formulasReferencesAlso see
factor postestimationDescriptionSpecial-interest postestimation commands
Syntax for predictMenu for predictOptions for predictSyntax for estatMenu for estatOptions for estatRemarks and examplesPostestimation statisticsPlots of eigenvalues, factor loadings, and scoresRotating the factor loadingsFactor scores
Stored resultsMethods and formulasestatrotatepredict
ReferencesAlso see
hotellingSyntaxMenuDescriptionOptionsRemarks and examplesStored resultsMethods and formulasReferencesAlso see
manovaSyntaxMenuDescriptionOptionsRemarks and examplesIntroductionOne-way MANOVAReporting coefficientsTwo-way MANOVAN-way MANOVAMANCOVAMANOVA for Latin-square designsMANOVA for nested designsMANOVA
top related