# st: RE: Calculating a "disagrement scale" from several individuall assessments

 From "Nick Cox" To Subject st: RE: Calculating a "disagrement scale" from several individuall assessments Date Sun, 11 Feb 2007 16:41:55 -0000

```I don't see that this can be answered without a formula
or algorithm for your scale. All that's obvious here
is that if everyone agrees, there is no disagreement.

One of many possible scales is sum(abs(value) - median).
That recipe fits #1 and #2 and is computable quite concisely
for three variables. Also, with three, the median is
automatically the same as the majority vote whenever
two or three people agree. That is, when a clearcut mode
exists, it is also the median.

I found this trick for the median of three things
in extra Stata code bundled with Larry Hamilton's first
"Statistics with Stata" published in 1990. I don't
think I've had an opportunity to use or publicise
the idea in the interval since I read it in 1991.

First, with three values, you don't need to worry
about sorting. The median is the sum minus
the maximum minus the minimum, and this is still
true with two or three ties:

row median = A + B + C - min(A,B,C) - max(A,B,C)

then you want

abs(A - row median) + abs(B - row median) + abs(C - row median)

You could fit that in one Stata line, but I would use
two:

gen rowmed = A + B + C - min(A, B, C) - max(A, B, C)
gen DS = abs(A - rowmed) + abs(B - rowmed) + abs(C - rowmed)

Nick
n.j.cox@durham.ac.uk

Christer Thrane

> I have three variables: A, B, and C. They are individual
> assesssments of the
> same phenomenon on a scale from 1 (poor) to 5 (very good).
> The data looks
> like:
>
> id        A    B    C       DS
> 1        4    4     4        0
> 2        3    4     4        1
> 3        5    2     3        ?
> 4        2    2     4        ?
> and so on.
>
> From these data I would like to create a "disagreement
> scale", DS. For the
> first observation there is no disagrement, hence DS becomes
> 0.  For the
> second observation DS becomes 1. For the third and fourth
> observation, DS
> becomes ....???

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```