Announcement

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

  • Attempting to Use gen command with imputed data

    Dear Stata Users,

    I am trying to run a difference-score or a change-score method on imputed data with the following syntax

    HTML Code:
    gen total=infractions1+infractions2 
    gen contact0=contact2-contact1
    gen pwas0=pwas2-pwas1
    gen therapy0=therapy2-therapy1
    
    blogit infractions2 total
    blogit infractions2 total contact0 pwas0 therapy0 miles age length race
    I have tried a few modifications to the syntax by first converting my wide imputed data into flong and then using the mi estimate: gen... but that didn't seem to work. I tried reshaping the data to long and using bys ID: gen... and that did not work either. What is the best way to modified this syntax to fit imputed data?


    Thank you for your time and cooperation,

    Roxy

  • #2
    I am not clear on what you are trying to do but I think the following will help:
    Code:
    help mi_passive

    Comment


    • #3
      Hi Rich Goldstein,

      I was able to create the new variable using mi xeq command.


      Thank you.

      Comment

      Working...
      X