Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Matthew Krauchunas <krauchunasms@mymail.vcu.edu> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: Splitting a file up into years, running analysis, and combining file again. Necessary due to a glitch in Stata command. |
Date | Tue, 10 Aug 2010 14:27:40 -0400 |
Hello, I have data that I am working with for years 2002-2004 & 2006-2008. I am geocoding and creating alternative markets using a 15 mile and 25 mile radius via the user created CIRCNUM command. However, I came across a problem with the CIRCNUM command when I tried to run it by groups (i.e., year). * Creating nursing home HHI using a 15 mile radius * by year: circnum localTotalSize15, radius(15) miles sum(lic_bed_month_avg) by year: circnum nh_hhi15, radius(15) miles sum("(lic_bed_month_avg[j]/localTotalSize15[i])^2") It appears that it does not reset when it move on to the next group. For instance, I segregated the data into three files: 2002, 2003, and 2002 & 2003 files. The numbers for the 2002/2003 combined file do not match the numbers when the years are run by themselves. I have notified the command's developer, but I cannot wait for a fix action. Thus, my only recourse is to break the file up into individual years, run the appropriate analyses using CIRCNUM, and then append the files. Does anyone have any suggestions? My file name is G:\Merged_Joined_Appended files\clean oscar oshpd merge wgis.dta. Thanks for your help. Matt * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/