Missing Values and Recoding Categorical Variables in Stata

Поділитися
Вставка
  • Опубліковано 14 жов 2024
  • This short video lecture demonstrates how to use the replace and generate commands to insert missing values and to recode a categorical variable in Stata

КОМЕНТАРІ •

  • @GimaelManda
    @GimaelManda 3 місяці тому

    Helpful. Thanks

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

    This is an incredibly convoluted way of generating dummy variables. A way faster way to generate the education dummy variables is clean up the missing categories, and then use the command:
    tab EDUCATION, gen(educd)
    This will generate a series of dummy variables educd1 educd2 etc for each of the education categories. Then either stick with the original names or use rename.

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

    It would be helpful if u do it in R as well.

  • @lan8854
    @lan8854 5 років тому

    can you recode missings in all variables at once? for instance, if all missing variables were coded with a 99, is there a command to replace all 99 to missing in all variables?

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

      try using the recode command so
      recode VARIABLENAME (-7 -9 = .)

  • @zerinimam
    @zerinimam 4 роки тому

    Thank you very much

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

    Thank you Sir

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

    so you have calculated the mean of a categorical variable??????????????