Renaming Variables, Dropping Variables or Cases, and Sorting in Stata

Поділитися
Вставка
  • Опубліковано 5 жов 2024

КОМЕНТАРІ • 13

  • @joao86
    @joao86 7 років тому

    Great and straightforward tutorial. Thanks!

  • @Felipeguedesconsultoria
    @Felipeguedesconsultoria 7 років тому +1

    Hi Jeff. Very good tutorial. But in my case I am working with a huge dataset and I need to select a range of values from a variable. This specific variable is a code and it is divided in month's period. So I needed to get all the periods. How can I do that?

  • @kyokoronotomo931
    @kyokoronotomo931 7 років тому

    thank you ..its very helpfull

  • @elenak8357
    @elenak8357 2 роки тому

    How do you then re-add data? Say that you use "drop if height>120", and then you later change your mind about which data you mean to exclude?

  • @agentjucey
    @agentjucey 8 років тому +1

    What if zeros dont show up and its just blanks. how do I fix that? i keep getting r2000 missing data

  • @jaumidasdfasdf8270
    @jaumidasdfasdf8270 8 років тому

    Thank you for your video, very clear and usefull!! Nevertheless, I am in case in which I have hundreds of variables and I would like to drop most of them and just keep 20. How can I drop all and just keep the few that I need without go one by one?

    • @chitraalma2754
      @chitraalma2754 8 років тому

      have u found the answer yet? i have the same question as yours

    • @sebastianwegener9411
      @sebastianwegener9411 8 років тому

      You can just specify which variables to keep and the rest will be dropped. (command is keep)

    • @chitraalma2754
      @chitraalma2754 8 років тому

      Yes, I've figured it out. Thank you.

  • @minididi42
    @minididi42 6 років тому

    Why would you drop a variable if you're not including it in a model? Is this for organizational purpose?

    • @elenak8357
      @elenak8357 2 роки тому

      Some data seems flawed in some way, or needs a re-measurement. If something has a value of zero, such as height, for a human, that is impossible. It would be considered an error and dropped from the dataset.

  • @jamespritchard4288
    @jamespritchard4288 3 роки тому

    I have a long list of variables with 'a_' at the start. I am trying to delete this and replace it with just the rest of the name after 'a_'. For example a_age, a_sex, etc. I want to just be 'age' and 'sex'. I tried a command 'rename a_**' but this gave me a syntax error. Please can you help? I have lots of data sheets to merge with a_, b_, c_, etc and need to merge to analyse. Thanks!

    • @Gerrardkerel
      @Gerrardkerel 3 роки тому

      Might be a bit late, but the command ' rename *a_* ** ' should work.