Announcement

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

  • Stored results from mi test

    Hi Statalist,

    I have a dataset with multiple imputations, and I am testing interactions in a cox regression model:

    -------------------------------------------------------
    mi stset outdate, failure(death=1) origin(time baseline) scale (365.25)

    mi estimate: stcox c.var1#i.var2 c.var1 i.var2

    mi test c.var1#1.var2 c.var1#2.var2 c.var1#3.var2 c.var1#4.var2
    --------------------------------------------------------

    This gives me a p-value for the interaction:
    Prob > F = 0.0184


    Now I would like to automatically insert this p-value in a table in a word document - something like:

    ---------------------------------------------------------
    putdox table Table1(3,5) =(" `p-value' ")
    ---------------------------------------------------------

    But I cannot figure out how to collect the p-value from the output.
    Does anyone know how to store/collect results from mi test?

    Any help is much appreciated.

    Best regards,
    Amalie



  • #2
    the help file for -mi test- tells us that the p-value is saved in "r(p)"; recall that this is temporary so, unless you are going to use it immediately, save it into a local (or scalar) first and then use; I do not use -putdocx- so cannot help there

    Comment


    • #3
      Perfect. Thank you very much!

      Comment

      Working...
      X