Announcement

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

  • Query concerning graphical methods of agreement concord/batplot commands

    Dear colleagues,

    Question: When using graphical methods to assess agreement between two scales (concord/batplot commands) Is there any command to generate a list of the observations that lie outside the limits of agreement?

    I have a cohort of patients (n=366) who had two questionnaires administered, the Barthel Index a measure of functional independence, and the EQ-5D-3L utiltiy score a health-related quality of life score.

    The data has been log transformed and converted to z scores.

    I am attempting to measure the agreement between the two instruments including using graphical methods to display agreement, using concord and batplot commands. The commands work well and graphs are shown below.

    I would now like to investigate the outliers, the observations that lie outside the limits of agreement. Is there any command to generate a list of the observations that lie outside the limits of agreement? I am currently labelling outliers and recording study id manually, which is a little time consuming and inelegant.

    Grateful for any suggestions,


    concord z_w7 z_y7, loa mlabel(record_id)

    batplot z_w7 z_y7 , info moptions(mlabp(9)) sc(jitter(4)) valabel (record_id)

    Click image for larger version

Name:	Graph.png
Views:	1
Size:	193.2 KB
ID:	1726544

  • #2
    I don't know much about the options in the two commands, but the agreement limit is just computed from mean of the difference +/- 1.96 * SD of the difference. So you can retrieve that outside the programs. See this comparison:

    Code:
    sysuse nlsw88, clear
    
    concord age wage, loa
    graph save g01, replace
    
    * Difference
    gen dv = age - wage
    egen mv = rowmean(age wage) if !missing(age, wage)
    
    * 95% agreement limit
    quietly sum dv
    local lowerb = `r(mean)' - 1.96 * `r(sd)'
    local upperb = `r(mean)' + 1.96 * `r(sd)'
    
    display `lowerb'
    display `upperb'
    
    twoway scatter dv mv, yline(`=`lowerb'' `=`upperb'')
    graph save g02, replace
    
    graph combine g01.gph g02.gph
    Results:
    Click image for larger version

Name:	image_32213.png
Views:	1
Size:	121.0 KB
ID:	1726590


    So, you can simply list the ID with an "if" condition:

    Code:
    * Make up an ID here since the same data has no ID:
    gen id = _n
    
    * Create an out of bound indicator:
    quietly sum dv
    gen outbound = (dv < `r(mean)' - 1.96 * `r(sd)' | ///
                    dv > `r(mean)' + 1.96 * `r(sd)')
                    
    list id if outbound
    Last edited by Ken Chui; 09 Sep 2023, 17:44.

    Comment


    • #3
      The display in #1 suggests to me two main groups, one falling on a line, just about, and the other more diffuse. This situation is one in which neither the concordance correlation nor the plot delivers an adequate summary of the data. I would like to see a more orthodox scatter plot of the two variables. A listing of the data would help too if possible.

      Comment

      Working...
      X