Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using the LTDB and getting an "Invalid 'data'" error

    Hey all,

    I need to use the LTDB to sync tracts between 2000 and 2010, and the error I'm getting says "invalid 'data'". I think maybe its a problem with using Geo_FIPS as the the global_idvar in the do file, but I'm not sure. I have tried padding the geo_FIPS with 0's as it says to in the do file but still get the error. I've included the do file in the post if that helps. Thanks.

    Attached Files

  • #2
    So I figured it out if anyone encounters a similar problem, the do file was asking for global input_file "data.dta", which is what was messing it up. I went through and replaced any global input_file reference with the specific pathway to my data and the problem was solved.

    So a command in the do file like,

    use $input_file
    was replaced with

    use "data.dta"
    This solved the problem completely.

    Comment


    • #3
      First, you solved your problem, congratulations! It sounds as if the error message didn't do as much as it could have to point you to the source of the problem.

      For future reference, it seems to me that the result you achieved could have been achieved by editing just the first line of the do-file, which defines the global variable $input_file, replacing the example file path given with the path to your file. Then subsequent references to $input_file would have been replaced by references to your input file.

      The comment that it is not necessary to edit anything below that line is usually a hint that the user is expected to edit the lines above the comment as needed for the application the do-file is being used for.
      Code:
      global input_file "F:\Custom Data Tables\Stata\2000Condensed.dta"
      global output_file "CW2000.dta"
      global crosswalk_file "F:\Crosswalk\crosswalk_2000_2010.dta"
      global crosswalk_year "00"
      global input_idvar "Geo_FIPS"
      global counts ""
      global medians "rentercashMGRaspercent"
      global median_weights "rent"
        
      /****************************************************
       It is not necessary to edit anything below this line.
       ****************************************************/
      
      /****************************************************
                   Explanation of user inputs
       ****************************************************
      
       - "input_file" is the name of your data file in
         STATA format.
      
      ... (remainder omitted)

      Comment

      Working...
      X