Announcement

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

  • XTDATA and MISSING

    Hi all,

    is there a way to prevent xtdata command not to ignore missing values, or better, to avoid xtdata to transform just the values that are complete in all the variables specified?
    i.e. if I specify xtdata var1 var2 var3 and observation i has var3 which missing, xtdata automatically drops the entire observation i. I would like to avoid this.

    Thank you,

    federico

  • #2
    Federico:
    a possible fix that springs to my mind is to replace missing values with something like -9999- before running -xtdata- and then restore their missingness after -xtdata-.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Carlo,

      thanks for the reply. I have already used such an approach but the problems are two:

      1) the values are changed by xtdata also taking into account the new values put instead of missing (so if strata performs a demeaning, the mean is computed also taking into account the new values put instead of the missing, which also prevents me to replace the missing values with the mean of the variable). Since I will replicate an xtreg, fe through a reg after it seems to me not feasible.

      2) how can I spot missing values once I have performed xtdata ?

      Thank you again,

      Federico

      Comment

      Working...
      X