Announcement

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

  • Dropping unnecessary variable from BRFSS data to save space

    Is there any efficient way to keep the variables I need and drop all the unnecessary variables ? In BRFSS , I need to clean year by year and it hardly has an consistency over the years. So any suggestion to remove the unnecessary variables will help me to save the space.

    Thanks in advance !

  • #2
    Code:
    help drop
    The above also covers -keep-.

    Comment


    • #3
      If you only want to keep certain variables, there is a -keep- statement. With -drop- you would need a separate list each year but with -keep- you might be able to use one list for all the years (if the list of desired variables is constant).

      If the data is in .dta format, note that the -use- statement can take a variable list. For example,
      Code:
      use var1 var2... using file
      =append- also has a -keep() options.

      What format does the BFSS data come in? Isn't it ASCII? Why would you put variables you didn't want in the -infix- statement?

      Comment


      • #4
        See also -help compress-, which does not compress in the the common usage of the word, but rather checks to see if variables can be stored in smaller storage types without loss of information.

        Comment


        • #5
          Thanks everyone for thoughtful command. Since, I have no prior experience of working with BRFSS data , so I'm still trying to keep option which variable I'd like to use when I go further ahead. Still trying to experiment with it due to my lack of knowledge about the whole data set. As everyone kindly suggested , I'd keep these thoughtful commands in mind.

          Appreciate the kind and thoughtful response from everyone !

          Comment

          Working...
          X