. set mem 777m (795648k) . . **------------------------------------------------; . . ** This program reads the 2004 SIPP3 Longitudnal Replicate Weight File for Calendar Year 2006 Data File . ** Note: This program is distributed under the GNU GPL. See end of . ** this file and http://www.gnu.org/licenses/ for details. . ** by Jean Roth Wed Nov 3 15:35:34 EDT 2010 . ** Please report errors to jroth@nber.org . ** run with do sipplrw04_cy3 . . **-----------------------------------------------; . . ** The following line should contain . ** the complete path and name of the raw data file. . ** On a PC, use backslashes in paths as in C:\ . . local dat_name "/tmp/lrw04_cy3.dat" . . ** The following line should contain the path to your output '.dta' file . . local dta_name "sipplrw04_cy3.dta" . . ** The following line should contain the path to the data dictionary file . . local dct_name "sipplrw04_cy3.dct" . . ** The following line should contain the complete path and name of the compressed data file. ; . . local compressed "/homes/data/sipp/2004/lrw04_cy3.zip" . . ** Removing dat_name . capture rm `dat_name' . . ** Uncompressing the raw data file to /tmp . ** Note that /tmp must have enough space to write the uncompressed file . ! unzip -p `compressed' > "`dat_name'" . . ** The line below does NOT need to be changed . . quietly infile using "`dct_name'", using("`dat_name'") clear . . ** Removing the temp file when finished . ! rm -f "`dat_name'" . . ** Decimal places have been made explict in the dictionary file. . ** Stata resolves a missing value of -1 / # of decimal places as a missing value. . . **Everything below this point, aside from the final save, are value labels . . #delimit ; delimiter now ; . ; . label values spanel spanel; . label define spanel > 2004 "Panel Year" > ; . #delimit cr delimiter now cr . desc,short Contains data obs: 35,009 vars: 126 size: 34,763,937 (95.7% of memory free) Sorted by: Note: dataset has changed since last saved . . sort ssuid epppnum . saveold `dta_name' , replace (note: file sipplrw04_cy3.dta not found) file sipplrw04_cy3.dta saved . . . . ** Copyright 2010 shared by the National Bureau of Economic Research and Jean Roth ; . . ** National Bureau of Economic Research. ; . ** 1050 Massachusetts Avenue ; . ** Cambridge, MA 02138 ; . ** jroth@nber.org ; . . ** This program and all programs referenced in it are free software. You ; . ** can redistribute the program or modify it under the terms of the GNU ; . ** General Public License as published by the Free Software Foundation; . ** either version 2 of the License, or (at your option) any later version. ; . . ** This program is distributed in the hope that it will be useful, ; . ** but WITHOUT ANY WARRANTY, without even the implied warranty of ; . ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; . ** GNU General Public License for more details. ; . . ** You should have received a copy of the GNU General Public License ; . ** along with this program, if not, write to the Free Software ; . ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. ; . end of do-file