3rd Edition

One Hundred Nineteen Stata Tips, Third Edition

By Nicholas J. Cox, H. Joseph Newton Copyright 2014
    344 Pages
    by Stata Press

    One Hundred Nineteen Stata Tips provides concise and insightful notes about commands, features, and tricks that will help you obtain a deeper understanding of Stata. The book comprises the contributions of the Stata community that have appeared in the Stata Journal since 2003.

    Introducing Stata tips. Stata tip 1: The eform() option of regress. Stata tip 2: Building with floors and ceilings. Stata tip 3: How to be assertive. Stata tip 4: Using display as an online calculator. Stata tip 5: Ensuring programs preserve dataset sort order. Stata tip 6: Inserting awkward characters in the plot. Stata tip 7: Copying and pasting under Windows. Stata tip 8: Splitting time-span records with categorical time-varying covariates. Stata tip 9: Following special sequences. Stata tip 10: Fine control of axis title positions. Stata tip 11: The nolog option with maximum-likelihood modeling commands. Stata tip 12: Tuning the plot region aspect ratio. Stata tip 13: generate and replace use the current sort order. Stata tip 14: Using value labels in expressions. Stata tip 15: Function graphs on the fly. Stata tip 16: Using input to generate variables. Stata tip 17: Filling in the gaps. Stata tip 18: Making keys functional. Stata tip 19: A way to leaner, faster graphs. Stata tip 20: Generating histogram bin variables. Stata tip 21: The arrows of outrageous fortune. Stata tip 22: Variable name abbreviation. Stata tip 23: Regaining control over axis ranges. Stata tip 24: Axis labels on two or more levels. Stata tip 25: Sequence index plots. Stata tip 26: Maximizing compatibility between Macintosh and Windows. Stata tip 27: Classifying data points on scatter plots. Stata tip 28: Precise control of dataset sort order. Stata tip 29: For all times and all places. Stata tip 30: May the source be with you. Stata tip 31: Scalar or variable? The problem of ambiguous names. Stata tip 32: Do not stop. Stata tip 33: Sweet sixteen: Hexadecimal formats and precision problems. Stata tip 34: Tabulation by listing. Stata tip 35: Detecting whether data have changed. Stata tip 36: Which observations? Stata tip 37: And the last shall be first. Stata tip 38: Testing for groupwise heteroskedasticity. Stata tip 39: In a list or out? In a range or out? Stata tip 40: Taking care of business. Stata tip 41: Monitoring loop iterations. Stata tip 42: The overlay problem: Offset for clarity. Stata tip 43: Remainders, selections, sequences, extractions: Uses of the modulus. Stata tip 44: Get a handle on your sample. Stata tip 45: Getting those data into shape. Stata tip 46: Step we gaily, on we go. Stata tip 47: Quantile–quantile plots without programming. Stata tip 48: Discrete uses for uniform(). Stata tip 49: Range frame plots. Stata tip 50: Efficient use of summarize. Stata tip 51: Events in intervals. Stata tip 52: Generating composite categorical variables. Stata tip 53: Where did my p-values go? Stata tip 54: Post your results. Stata tip 55: Better axis labeling for time points and time intervals. Stata tip 56: Writing parameterized text files. Stata tip 57: How to reinstall Stata. Stata tip 58: nl is not just for nonlinear models. Stata tip 59: Plotting on any transformed scale. Stata tip 60: Making fast and easy changes to files with filefilter. Stata tip 61: Decimal commas in results output and data input. Stata tip 62: Plotting on reversed scales. Stata tip 63: Modeling proportions. Stata tip 64: Cleaning up user-entered string variables. Stata tip 65: Beware the backstabbing backslash. Stata tip 66: ds—A hidden gem. Stata tip 67: J() now has greater replicating powers. Stata tip 68: Week assumptions. Stata tip 69: Producing log files based on successful interactive commands. Stata tip 70: Beware the evaluating equal sign. Stata tip 71: The problem of split identity, or how to group dyads. Stata tip 72: Using the Graph Recorder to create a pseudograph scheme. Stata tip 73: append with care! Stata tip 74: firstonly, a new option for tab2. Stata tip 75: Setting up Stata for a presentation. Stata tip 76: Separating seasonal time series. Stata tip 77: (Re)using macros in multiple do-files. Stata tip 78: Going gray gracefully: Highlighting subsets and downplaying substrates. Stata tip 79: Optional arguments to options. Stata tip 80: Constructing a group variable with specified group sizes. Stata tip 81: A table of graphs. Stata tip 82: Grounds for grids on graphs. Stata tip 83: Merging multilingual datasets. Stata tip 84: Summing missings. Stata tip 85: Looping over nonintegers. Stata tip 86: The missing() function. Stata tip 87: Interpretation of interactions in nonlinear models. Stata tip 88: Efficiently evaluating elasticities with the margins command. Stata tip 89: Estimating means and percentiles following multiple imputation. Stata tip 90: Displaying partial results. Stata tip 91: Putting unabbreviated varlists into local macros. Stata tip 92: Manual implementation of permutations and bootstraps. Stata tip 93: Handling multiple y axes on twoway graphs. Stata tip 94: Manipulation of prediction parameters for parametric survival regression. Stata tip 95: Estimation of error covariances in a linear model. Stata tip 96: Cube roots. Stata tip 97: Getting at ρ’s and σ’s. Stata tip 98: Counting substrings within strings. Stata tip 99: Taking extra care with encode. Stata tip 100: Mata and the case of the missing macros. Stata tip 101: Previous but different. Stata tip 102: Highlighting specific bars. Stata tip 103: Expressing confidence with gradations. Stata tip 104: Added text and title options. Stata tip 105: Daily dates with missing days. Stata tip 106: With or without reference. Stata tip 107: The baseline is now reported. Stata tip 108: On adding and constraining. Stata tip 109: How to combine variables with missing values. Stata tip 110: How to get the optimal k-means cluster solution. Stata tip 111: More on working with weeks. Stata tip 112: Where did my p-values go? (Part 2) Stata tip 113: Changing a variable’s format: What it does and does not mean. Stata tip 114: Expand paired dates to pairs of dates. Stata tip 115: How to properly estimate the multinomial probit model with heteroskedastic errors. Stata tip 116: Where did my p-values go? (Part 3). Stata tip 117: graph combine—Combining graphs. Stata tip 118: Orthogonalizing powered and product terms using residual centering. Stata tip 119: Expanding datasets for graphical ends.

    Biography

    Nicholas J. Cox, H. Joseph Newton