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

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024

Комментарии • 13

  • @joao86
    @joao86 6 лет назад

    Great and straightforward tutorial. Thanks!

  • @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

  • @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 Год назад

    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?

  • @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 Год назад

      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.

  • @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.

  • @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.