Announcement

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

  • Spearman rank correlation

    Hi,
    I have tested the correlation between two measures of physical activity (accelerometer versus questionnaire). I used Spearman. Would it be appropriate to also run bland altman plots or is that usually only used with concordance correlation?

  • #2
    Bland-Altman plots plot differences versus means. They were used by many people before Bland and Altman.

    Plotting difference versus mean requires variables to be measured in the same units and makes most sense if there is an expectation that the difference between means is approximately constant. (Conversely if that isn't true you find out fast.).

    So, what is true of your variables?

    Comment


    • #3
      Thank you what test is appropriate to run to find out whether the difference between means is or isn't approximately constant?

      Comment


      • #4
        Otherwise stated, it's just a Student's t test. The alternative hypothesis is one of different means and in that context a difference of means is always a constant. In different language, the difference between groups is an additive shift.

        That's not meant to sound trivial.

        For example, #2 at https://www.statalist.org/forums/for...dable-from-ssc shows (or rather, implies) that although a t test comparing mpg for foreign and domestic cars will answer the question it is asked, there are grounds for thinking the shift is more nearly multiplicative (additive on logarithmic scale) or (different!) additive on a reciprocal scale.

        If the difference between means varies systematically, that's quite possibly a case for a regression with interaction terms.

        Comment


        • #5
          Thanks do you have any guidance on how to run a 'Student' ttest? I can run a normal ttest though in this situation I don't know what the 'hypothesised mean' is. I have one sample and two variables.
          I tried recreating the code from your link but don't seem to be able to download anything from stata journal other than articles so can't seem to get qplot. Does it require a paid subscription?

          Comment


          • #6
            qplot is free. Typing

            Code:
            . search qplot, sj
            should produce various references. At the time of writing the latest public version of the software files is at


            Code:
            SJ-19-3 gr42_8  . . . . . . . . . . . . . . . . . .  Software update for qplot
                    (help qplot if installed) . . . . . . . . . . . . . . . . .  N. J. Cox
                    Q3/19   SJ 19(3):748--751
                    graph defaults have been tweaked and help file has been
                    extended
            If you don't have a specific hypothesis on what the difference between means should be, which in any case would be unusual, turn the problem into one of getting a confidence interval for the difference.

            Comment


            • #7
              Thanks! Have plugged in that example first to see what it looked like but have an error?

              Code:
              . sysuse auto, clear
              (1978 Automobile Data)
              
              .
              . set scheme s1color
              
              .
              . transplot qplot mpg, over(foreign) trans(@ sqrt log 1000/@) scheme(s1color) legend(pos(11) ring(
              > 0) order(2 1) col(1)) trscale(invnormal(@)) xtitle(standard normal deviate)
              r(198);
              
              .

              Comment


              • #8
                Works for me. Make sure the command line isn't broken.

                Code:
                 
                 transplot qplot mpg, over(foreign) trans(@ sqrt log 1000/@) scheme(s1color) legend(pos(11) ring(0) order(2 1) col(1)) trscale(invnormal(@)) xtitle(standard normal deviate)


                Comment


                • #9
                  I've copied and pasted your code but it is still giving me the same result of r(198). I have copied and pasted and wrote it out.
                  Is there other coding I can use to simply find out whether or not the difference between means is or isn't approximately constant? I have two variables (objective and subjective)
                  Last edited by Joe Tuckles; 18 Jan 2021, 11:34.

                  Comment


                  • #10
                    Nick is the best. Nick's code works for me.
                    Best regards.

                    Raymond Zhang
                    Stata 17.0,MP

                    Comment


                    • #11
                      In that case is there a package or program I need to download? Have installed transplot and qplot. I'm using stata 14.

                      Comment


                      • #12
                        If you've installed transplot and qplot then #8 should work. You should show us the code you tried. The only idea I have is that invisible formatting characters are confusing Stata.

                        If and only if subjective objective and are paired, then you always go

                        Code:
                        gen diff = objective - subjective 
                        gen mean = (objective + subjective) / 2 
                        scatter diff mean
                        and look for patterns. https://www.stata-journal.com/articl...article=gr0005 may help.

                        Comment


                        • #13
                          Hmm I don't think the data are paired. Subjective is a questionnaire and objective is an accelerometer device. Both designed by completely different companies.

                          Comment


                          • #14
                            Pairing would mean that you have two different measures for the same persons, so in Stata terms you are comparing within observations.

                            Lack of pairing just means that you have two (or more) groups of observations.

                            In your case, on the information you give, your set-up sounds paired to me.

                            The auto data in Stata are a simple example of unpaired data. Foreign and domestic cars are not, paired off;

                            Comment


                            • #15
                              Details in the concurrent thread https://www.statalist.org/forums/for...tistic-correct underline that your data do appear to be paired.

                              Comment

                              Working...
                              X