Announcement

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

  • (How) Can I calculate a significance test for Kendall´s Tau c in Stata?

    Dear community,

    I calculated Kendall´s tau c in Stata "by hand" because the ktau-command only contains results for tau a and b.
    I used the syntax for tau c provided by Roger Newson (https://www.stata.com/statalist/arch.../msg00300.html).
    Now I am wondering if there is a way to calculate a significance test or even better, a confidence intervall, for tau c.

    Thank you in advance!
    Laura

  • #2
    Bootstrap it?

    Comment


    • #3
      Yes, I tried that but I didn´t find the right syntax yet. I am not that experienced in the use of Stata. Do you maybe have a clue for me how to use the bootstrap-command in this case?

      Comment


      • #4
        You'd need to write a wrapper program that emits tau_c as a r-class or e-class result. Sorry, but that is a bigger deal than I have time for today. Someone else may be able to help.

        Comment


        • #5
          I see, thanks for your hint. I will try to do something with it myself and hope for someone being able to help.

          Comment


          • #6
            Hi Laura
            The Bootstrap procedure that i use for cases something like this is:
            Code:
            program myktau, eclass
            syntax varlist
            ktau `varlist'
            matrix b=[r(tau_a),r(tau_b)]
            ** This is just for illustration, and should follow whichever formula you have been applying
            local tau_c=r(tau_a)*r(tau_b)
            matrix b=b,`tau_c'
            matrix colname b=tau_a tau_b tau_c
            ereturn post b
            end
            sysuse auto, clear
            bootstrap:myktau foreign trunk
            This should do what you need to obtain CI, as long as you replace tau_c with the correct formula, which i think you already have.
            This is also a very simple version of the bootstrap that uses all data. You may want to adjust it for specific cases.
            HTH
            Fernando

            Comment


            • #7
              Dear Fernando,
              yes, I do have a formula for tau c that calculates the value of it and I have specified datasets which only contain the cases I want to include in the bootstrap. So I think your suggestion will be very helpful once I manage to apply it to my data. Thank you very much!
              Cheers
              Laura

              Comment

              Working...
              X