STATA March 2001 TECHNICAL STB-60 BULLETIN A publication to promote communication among Stata users Editor Associate Editors H. Joseph Newton Christopher F. Baum, Boston College Department of Statistics Nicholas J. Cox, University of Durham Texas A & M University Joanne M. Garrett, University of North Carolina College Station, Texas 77843 Marcello Pagano, Harvard School of Public Health 979-845-3142 J. Patrick Royston, UK Medical Research Council 979-845-3142 Jeroen Weesie, Utrecht University 979-845-3144 FAX stb@stata.com EMAIL Subscriptions are available from StataCorporation, email stata@stata.com, telephone 979-696-4600 or 800-STATAPC, fax 979-696-4601. Current subscription prices are posted at www.stata.com/bookstore/stb.html. Previous Issues are available individually from StataCorp. See www.stata.com/bookstore/stbj.html for details. Submissions to the STB, including submissions to the supporting files (programs, datasets, and help files), are on a nonexclusive, free-use basis. In particular, the author grants to StataCorp the nonexclusive right to copyright and distribute the material in accordance with the Copyright Statement below. The author also grants to StataCorp the right to freely use the ideas, including communication of the ideas to other parties, even if the material is never published in the STB. Submissions should be addressed to the Editor. Submission guidelines can be obtained from either the editor or StataCorp. Copyright Statement. The Stata Technical Bulletin (STB) and the contents of the supporting files (programs, datasets, and help files) are copyright c by StataCorp. The contents of the supporting files (programs, datasets, and help files), may be copied or reproduced by any means whatsoever, in whole or in part, as long as any copy or reproduction includes attribution to both (1) the author and (2) the STB. The insertions appearing in the STB may be copied or reproduced as printed copies, in whole or in part, as long as any copy or reproduction includes attribution to both (1) the author and (2) the STB. Written permission must be obtained from Stata Corporation if you wish to make electronic copies of the insertions. Users of any of the software, ideas, data, or other materials published in the STB or the supporting files understand that such use is made without warranty of any kind, either by the STB, the author, or Stata Corporation. In particular, there is no warranty of fitness of purpose or merchantability, nor for special, incidental, or consequential damages such as loss of profits. The purpose of the STB is to promote free communication among Stata users. The Stata Technical Bulletin (ISSN 1097-8879) is published six times per year by Stata Corporation. Stata is a registered trademark of Stata Corporation. Contents of this issue page dm67.1. Enhancements to numbers of missing and present values 2 dm78.1. Describing variables in memory: update to Stata 7 3 dm87. Calculating the row product of observations 3 dm88. Renaming variables, multiply and systematically 4 dm89. Dropping variables or observations with missing values 7 dm90. Listing distinct values of a variable 8 gr46. Display a graph of nonlinear effects 11 sg160. On boundary-value likelihood-ratio tests 15 sg161. Analysis of the turning point of a quadratic specification 18 sg162. Tools for spatial data analysis 21 sts18. A test for long-range dependence in a time series 37 sts19. Multivariate portmanteau (Q) test for white noise 39 sxd4. Sample size estimation for cluster designed samples 41