Announcement

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

  • Dropping variable and saving it

    Hi everyone

    How can I

    Remove a variable from a dataset, but save it in such a way that you can merge it back to the main dataset if needed.

  • #2
    Mazvita:
    welcome to this forum.
    The best approach that springs to my mind is saving two copies of the same dataset and omit the variable of interest in one of them.
    Last edited by Carlo Lazzaro; 12 Feb 2023, 02:15.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Just as simple is to ignore a variable when you want it ignored and to include in manipulations when you want it included.

      What is the context here?

      You may drop a variable when you are confident that it is irrelevant to what you want to do, or just wrong from some point of view. Unless memory is a really big issue the hassle of a merge to include it once more is not usually worth any temporary benefit.

      Comment

      Working...
      X