Stata Lecture 13: Understanding Foreach, Forvalues, and Levelsof Loop

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

КОМЕНТАРІ • 5

  •  Місяць тому

    Hello Mr. I have a variable with 10 different values ​​and I need, from each one these values, to create a table that contains data from another variable. Could you guide me in defining this procedure? Thank you very much!

  • @tommy.h.descartes
    @tommy.h.descartes 11 місяців тому

    Thank you. But is I have a number of countries in a variable and I want to shorten the country names how would I go about doing this?

    • @Kroft-Tutorials
      @Kroft-Tutorials  11 місяців тому

      Dear Tommy,
      I would suppose a substring command from the egen package would help.
      Type substr(varname,1,x) to get the first x letters.
      Warm regards,
      Bram

  • @khedirderres3726
    @khedirderres3726 Рік тому

    Thanks