Announcement

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

  • Do i need to insert attweight at predict


    I’m currently using weights in my survival analysis after using IPTW in my observational dataset.

    Where treatment weight = 1 and control weights vary.

    Question: do I use weights with my predict command, or if it’s incorporated in stset I don’t need to reuse the attweight variable ?

    Code:
      stset survivalt [pw=attweight], failure(revised==1) scale(12) exit (time 10) 
      
      //proceed to use predict
      
      gen(agercs) center(60)
      
      stpm2 hormon agercs* pr_1, scale(hazard) df(4) eform
      
      range tt 0 5 100
      
      predict s0, survival timevar(tt) zeros ci



    The reason I ask is because my predict graphs without incorporating attweight at stset is v different to my predict graph following incorporation attweight at stset

    I wonder if the difference is due to the fact I need to include -attweight- at the predict level.

Working...
X