Announcement

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

  • psid install, troubleshooting

    I am getting an odd error in psid install (part of the PSIDTOOLS package due to Kit Baum.)

    Problem
    I write
    Code:
    psid install using path
    where "path" is a folder containing file.zip, which I downloaded from the PSID website. I get the error
    nothing to install
    r(198)​
    I tried adding quotes, as would be my usual practice. Same result. The path does not contain any spaces or special characters, just letters and numbers.

    Already Attempted..
    I tried pointing directly to the zipped folder I want installed. So now it's
    Code:
    psid install using path/file.zip
    and get an error saying
    directory path.zip not found
    r(601)
    I tried removing the space that was in the file name and adding quotes. Same result.

    I tried unzipping the file myself, so I write
    Code:
    psid install using path/file_unzipped
    and I get another "r(198) nothing to install".

    It appears that this exact syntax has worked for other people.

    Can somebody diagnose or advise?
    Please and thanks,
    Dave
    Last edited by David Dauria; 05 Jun 2017, 15:15.

  • #2
    See if this helps - it did for me.
    Code:
    psid install 1979 using path
    where path/fam1979.zip is the downloaded zip file.

    Comment


    • #3
      Hmm.
      I added the wave numbers and I still get the same error ("nothing to install"). However, your comment leads to wonder if I am downloading the data "the wrong way."

      My downloaded file is just a single .zip containing all the data (1968-1991, I think) with a custom name. I just named it "20170601_Download". Its contents are...
      Code:
      J228742.txt
      J228742.do
      J228742_codebook.xml
      J228742_formats.do
      Is there a specified way that the folder or its contents need to be named in order for psid install to work? It seems like there might be, based on the results I get when I set trace on. (See code below.) If so, is there documentation somewhere that spells out the required format?

      (Note: For readability, I replaced the actual path with "$path" in all instances. So if you're wondering why the macro isn't evaluating, that's why.)

      Code:
      .
      
      set trace on
      
      psid install using "$path"
      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- begin psid ---
      - version 13.0
      - syntax anything [using] [, *]
      - gettoken subcommand uservars: anything
      - if "`subcommand'" == "install" {
      = if "install" == "install" {
      - psid_install `uservars' `using', `options'
      = psid_install  using `"$path"', 
        --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- begin psid_install ---
        - version 13
        - syntax [anything] [using/] [, to(string) replace upgrade replacelong replacesingle clean lower cnef longonly ]
        - local source = cond("`cnef'"=="","PSID","CNEF")
        = local source = cond(""=="","PSID","CNEF")
        - INSTALL_`source' `0'
        = INSTALL_PSID using `"$path"', 
          ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ begin psid_install.INSTALL_PSID ---
          - syntax [anything] [using/] [, to(string) replace lower]
          - _CREATE_WAVELIST, wavelist(`anything')
          = _CREATE_WAVELIST, wavelist()
            ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ begin psid_install._CREATE_WAVELIST ---
            - syntax [, wavelist(numlist)]
            - return local wavelist `wavelist'
            = return local wavelist 
            -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- end psid_install._CREATE_WAVELIST ---
          - local wavelist `r(wavelist)'
          = local wavelist 
          - quietly {
          - if "`using'" == "" | "`using'" == "." local using `c(pwd)'
          = if "$path" == "" | "$path" == "." local using C:\Windows\system32
          - if "`to'" == "" | "`to'" == "." local to `c(pwd)'
          = if "" == "" | "" == "." local to C:\Windows\system32
          - local previousfiles: dir `"`using'"' files `"*"'
          = local previousfiles: dir `"$path"' files `"*"'
          - if `"`wavelist'"' == `""' {
          = if `""' == `""' {
          - local mh85zip: dir `"`using'"' files `"mh85*.zip"'
          = local mh85zip: dir `"$path"' files `"mh85*.zip"'
          - local cah85zip: dir `"`using'"' files `"cah85*.zip"'
          = local cah85zip: dir `"$path"' files `"cah85*.zip"'
          - local pidzip: dir `"`using'"' files `"pid*.zip"'
          = local pidzip: dir `"$path"' files `"pid*.zip"'
          - local indzip: dir `"`using'"' files `"ind*er.zip"'
          = local indzip: dir `"$path"' files `"ind*er.zip"'
          - local famzip: dir `"`using'"' files `"fam*.zip"'
          = local famzip: dir `"$path"' files `"fam*.zip"'
          - local wlthzip: dir `"`using'"' files `"wlth*.zip"'
          = local wlthzip: dir `"$path"' files `"wlth*.zip"'
          - }
          - else {
            foreach wave of local wavelist {
            local year2 = substr("`wave'",-2,2)
            local mh85zip `: dir `"`using'"' files `"mh85_`year2'.zip"''
            local cah85zip `: dir `"`using'"' files `"cah85_`year2'.zip"''
            local pidzip `: dir `"`using'"' files `"pid`year2'*.zip"''
            local indzip `: dir `"`using'"' files `"ind`wave'*.zip"''
            local famzip `famzip' `: dir `"`using'"' files `"fam`wave'*.zip"''
            local wlthzip `wlthzip' `: dir `"`using'"' files `"wlth`wave'*.zip"''
            }
            }
          - foreach type in ind fam wlth pid cah85 mh85 {
          - local `type'zip: list clean `type'zip
          = local indzip: list clean indzip
          - local `type'zip: list sort `type'zip
          = local indzip: list sort indzip
          - local zipfiles `zipfiles' ``type'zip'
          = local zipfiles  
          - }
          - local `type'zip: list clean `type'zip
          = local famzip: list clean famzip
          - local `type'zip: list sort `type'zip
          = local famzip: list sort famzip
          - local zipfiles `zipfiles' ``type'zip'
          = local zipfiles  
          - }
          - local `type'zip: list clean `type'zip
          = local wlthzip: list clean wlthzip
          - local `type'zip: list sort `type'zip
          = local wlthzip: list sort wlthzip
          - local zipfiles `zipfiles' ``type'zip'
          = local zipfiles  
          - }
          - local `type'zip: list clean `type'zip
          = local pidzip: list clean pidzip
          - local `type'zip: list sort `type'zip
          = local pidzip: list sort pidzip
          - local zipfiles `zipfiles' ``type'zip'
          = local zipfiles  
          - }
          - local `type'zip: list clean `type'zip
          = local cah85zip: list clean cah85zip
          - local `type'zip: list sort `type'zip
          = local cah85zip: list sort cah85zip
          - local zipfiles `zipfiles' ``type'zip'
          = local zipfiles  
          - }
          - local `type'zip: list clean `type'zip
          = local mh85zip: list clean mh85zip
          - local `type'zip: list sort `type'zip
          = local mh85zip: list sort mh85zip
          - local zipfiles `zipfiles' ``type'zip'
          = local zipfiles  
          - }
          - if `"`zipfiles'"' == "" {
          = if `""' == "" {
          - noi di `"{err} Nothing to install"'
       Nothing to install
          - exit 198

      Comment


      • #4
        You are applying psid install to a file it was not intended to process.

        From help psid we have
        Code:
               psid install  Create Stata datasets from the zip-files downloadable at 
                             http://simba.isr.umich.edu/Zips/ZipMain.aspx without any user intervention.
        From the Home > Data page at http://simba.isr.umich.edu/data/data.aspx we see links to five different sources of data. You have been using the PSID Data Center at http://simba.isr.umich.edu/default.aspx to generate a "customized data cart". The psidtools software expects to be handed the Packaged Data from the Home > Data > Packaged Data > Main and Supplemental Studies page at the URL given above.

        Comment


        • #5
          Hi all, I am having difficulty using psiduse. At this point, I am just trying to test if I can use the functionalities of psidtools. I have downloaded the fam1991 file from then psid packaged data. I use the command:

          psiduse || age [91]ER30692 || shealth [91]V20021 using [path]

          I receive the following error: file not found r(601).

          I have directed the psiduse to both a zip file and to a .dta file but get the same results. Any help would be great. Thank you

          Comment


          • #6
            Welcome to Statalist.

            I am not a user of the psidtools package of programs, but my reading of the help file for psiduse included within the psidtools package is that the path given to using is intended to be a directory into which you have placed the unzipped contents of the zip archive you downloaded.

            Code:
            Syntax
                psiduse || new_stub varname identifers [ || new_stub varname identifers ] using dirname [ , use_options ]
                    ...
                dirname is the name of the directory in which the PSID files are stored. ...

            Comment


            • #7
              Hello,

              I want to use PSID data and I've seen the best way to do it is by the PSID-Tool from Kit Baum.

              But I'm also having trouble using his package. If it's not asking too much, would anybody mind explaining me the whole process from how to use psid install until having a longitudinal data with a column from the years and for each variable I'm using throughout the years. For now, I have a zip file called J9347.zip and inside the data in a text file and to .do files. I have the data stored in "C:\User\Personal\Desktop".

              Could anybody detail what exact codes should I type until I have the data in a format I can xtset for example.

              Hope I'm not asking too much
              Thank you

              Comment

              Working...
              X