Announcement

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

  • SAS (.ssp) file too large to import to Stata/BE 18.0

    Hello! I am doing a project using the Medical Expenditure Panel Survey (MEPS) database. I am trying to import the 2011 Full Year Consolidated SAS (.ssp) file into Stata/BE 18.0. However, when I try to import this file, I get the following error message:

    import sasxport5 "File Name.ssp", clear
    xpt member h147 contains 2052 variables;
    no room to add more variables
    Up to 2,048 variables are allowed with this version of Stata. Versions are available that allow up to 120,000 variables.


    I only need to analyze about 5 variables from this file. Is there a way that I can only import those 5 variables from this file?
    Last edited by Kimmy Yim; 09 Nov 2024, 23:19. Reason: MEPS

  • #2
    From -help import sas-, see below. You can import a subset of variables

    Code:
        Load a subset of a SAS file (*.sas7bdat)
    
            import sas [namelist] [if] [in] using filename [, options]

    Comment


    • #3
      .ssp isn't a SAS dataset file per se. It's an old version of a SAS transport file—note that the O.P. used import sasxport5, which doesn't have that [namelist] option.

      It seems that the agency makes an ASCII formatted file available for this dataset, as well. Maybe O.P. could look into importing a subset of variables from that file.

      Otherwise, you might need a third-party intermediary or someone with full-fledged Stata to import it and pare it down for you. I don't know whether Python has a package that can read old .ssp transport datasets.

      Comment


      • #4
        ... and a Stata syntax file, i.e., do-file, that infixes said ASCII file. Reducing the do-file to the required variables should do.

        Comment

        Working...
        X