Announcement

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

  • How to export results from kmirnov test to latex?

    Hi! I am a new user of stata and I am unable to export results from "ks test" from stata to a latex file. The values are stored in r scalars and I think that is why I am unable to use estout package.

    Kindly Help.

    Thanks.

  • #2
    I want to just bring asdocx in notice here (Details can be found here https://fintechprofessor.com/asdocx/). asdocx is a premium version of asdoc (ssc describe asdoc).
    asdocx can easily create highly customized table. The following example shows the case of ksmirnov test.

    Code:
    webuse ksxmpl, clear
    ksmirnov x, by(group)
    asdocx addrow, data(Smaller group,       D,       P-value)
    asdocx addrow, data(`r(group1)', `r(D_1)', `r(p_1)') dec(3) row(2)
    asdocx addrow, data(`r(group2)', `r(D_2)', `r(p_2)') dec(3) row(3)
    asdocx addrow, data(Combined K-S: , `r(D)', `r(p)') dec(3) row(4)
    
    asdocx exportflex, save(Results.tex) replace
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	17.6 KB
ID:	1569293



    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

    Comment


    • #3
      There is room for many different styles and ways of working. Call me (very) old-fashioned, but I just write TeX code directly.

      Be that as it may, here are some suggestions for a future release.

      In TeX/LaTeX the standard for minus signs is through mathematical markup, so $-$ not a plain hyphen. If I saw hyphens for minus signs in a paper I was reviewing, I would bounce it back as one thing to revise.

      Is "Table 1: Table: Results" really the default here? That looks like one Table too many.

      Comment


      • #4
        Nick Cox, noted with thanks.
        Regards
        --------------------------------------------------
        Attaullah Shah, PhD.
        Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
        FinTechProfessor.com
        https://asdocx.com
        Check out my asdoc program, which sends outputs to MS Word.
        For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

        Comment


        • #5
          Thanks Nick Cox and Attaullah Shah

          Comment


          • #6
            What if I cannot afford asdocx, could you Nick Cox maybe show me a template on how to write this myself?
            Thanks a lot!

            Comment


            • #7
              Sorry, no. I don't offer or provide serious advice or code on TeX or LaTeX, modulo comments like those in #3.

              Comment

              Working...
              X