Announcement

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

  • Etable drop-problem

    hi! I have a problem. I try to use putdocx command with drop option. I get :

    . putdocx table tbl20(17,.), drop
    r(198);

    And I have 17 rows in the table so when I use putdocx table tbl20(16,.), drop, there is still 3rd row in the word-table. So I cannot drop that and Stata cannot recognise that. Why?

    Click image for larger version

Name:	Capture stata.PNG
Views:	1
Size:	17.6 KB
ID:	1424844






    putdocx table tbl20=etable , width(100%) memtable border(all, nil)
    putdocx table tbl20(1,1)=(" "), halign(left)
    putdocx table tbl20(1,2)=("Adj.HR"), halign(left)
    putdocx table tbl20(2,2), halign(center)
    putdocx table tbl20(2,1)=("`period2'"), halign(left)
    putdocx table tbl20(.,1), border(right, nil)
    putdocx table tbl20(1,.), border(bottom, nil)
    putdocx table tbl20(1,.), border(top, nil)
    putdocx table tbl20(1,6)=("95% adj.HR Confidence limits"), halign(right)
    putdocx table tbl20(2,6), halign(right)

    putdocx table tbl20(17,.), drop
    putdocx table tbl20(16,.), drop
    putdocx table tbl20(15,.), drop
    putdocx table tbl20(14,.), drop
    putdocx table tbl20(13,.), drop
    putdocx table tbl20(12,.), drop
    putdocx table tbl20(11,.), drop
    putdocx table tbl20(10,.), drop
    putdocx table tbl20(9,.), drop
    putdocx table tbl20(8,.), drop
    putdocx table tbl20(7,.), drop
    putdocx table tbl20(6,.), drop
    putdocx table tbl20(5,.), drop
    putdocx table tbl20(4,.), drop
    putdocx table tbl20(3,.), border(bottom, nil)
    putdocx table tbl20(3,.), drop
    putdocx table tbl20(.,4), drop
    putdocx table tbl20(.,3), drop
    putdocx table tbl20(1,.), border(bottom, nil)
    putdocx table tbl20(1,.), border(top, nil)
    putdocx table tbl20(.,2/5), nformat(%03.2f)
    putdocx table tbl20(.,3), nformat(%05.4f) halign(center)

    putdocx table tbl2T=(2,1)
    putdocx table tbl2T(1,1)=table(tbl2)
    putdocx table tbl2T(2,1)=table(tbl20)

    putdocx save cox0docapu.docx,replace
    Adj.HR P>|z|
    Overall adj.effect/pre vacc 1.06 0.7000
    >6 0.90 0.7000
    With regards,

    Jukka

  • #2
    I got one solution. By removing all the time row 3 and not from row 17, 16 ,15,...,4,3 and then when comes the last row from which normally Stata gives r(198), change that command to
    "capture putdocx table tbl20(3,.), drop", so ignoring Stata's error, it works! This etable error is a very annoying bug in Stata 15.1. What is the reason for this?
    With rgds,
    jukka

    Comment


    • #3
      Hi Jukka Ollgren:

      Thank you for reporting this bug. We will fix it in one of our future updates.

      Comment


      • #4
        Hi Jukka Ollgren:

        The fix has been added in today's update. You can type -update query- to get the latest update.

        Comment

        Working...
        X