___ ____ ____ ____ ____ tm /__ / ____/ / ____/ ___/ / /___/ / /___/ 10.0 Copyright 1984-2007 Statistics/Data Analysis StataCorp 4905 Lakeway Drive College Station, Texas 77845 USA 800-STATA-PC http://www.stata.com 979-696-4600 stata@stata.com 979-696-4601 (fax) 3-user Stata for Linux64 (network) perpetual license: Serial number: 999 Licensed to: Brian P. Poi, PhD StataCorp LP Notes: 1. (-m# option or -set memory-) 1.00 MB allocated to data 2. Command line editing disabled 3. Stata running in batch mode running /home/bpp/bin/profile.do ... . do michelso.do . /* NIST StRD benchmark from http://www.nist.gov/itl/div898/strd/ > > Univariate Summary Statistics > > Difficulty=Lower N=100 Observed > > File Name: michelso.dat > > Dataset Name: Speed of Light (in millions of meters per second) > > Description: This is an observed/"real world" data set > consisting of 100 measurements of the > speed of light in air. This classic experiment > was carried out by Michelson is 1879. > We here use this data to test accuracy > in summary statistics calculations. > > Stat Category: Univariate: Summary Statistics > > Reference: Dorsey, Ernest N. (1944). The Velocity of Light. > Transactions of the American Philiosophical > Society, Volume 34, Part 1, Pages 1-110, Table 22. > > y = mu + e > > Certified Values > Sample Mean ybar: 299.852400000000 > Sample Standard Deviation (denom. = n-1) s: 0.0790105478190518 > Sample Autocorrelation Coefficient (lag 1) r(1): 0.535199668621283 > > Number of Observations: 100 > */ . . clear . . scalar N = 100 . scalar mean = 299.852400000000 . scalar sd = 0.0790105478190518 . scalar rho1 = 0.535199668621283 . . qui input double y . . summarize y Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- y | 100 299.8524 .0790105 299.62 300.07 . assert scalar(N) == r(N) . . lrecomp r(mean) mean sqrt(r(Var)) sd r(mean) sqrt(r(Var)) 13.8 . . gen time = _n . tsset time time variable: time, 1 to 100 delta: 1 unit . corrgram y, lag(1) -1 0 1 -1 0 1 LAG AC PAC Q Prob>Q [Autocorrelation] [Partial Autocor] ------------------------------------------------------------------------------- 1 0.5352 0.5355 29.512 0.0000 |---- |---- . . lrecomp r(ac1) rho1 r(ac1) 13.4 . end of do-file