=New Work=
===Another round of refinements===
#The elbow method is pretty questionable in its current form, so we are going to try using the elbow in the curvature (degree of concavity) instead.
====Jim's notes on the curvature====
Suppose we have a function f. Then what I have been calling the curvature is -f’’/f’. If f is a utility function this is the coefficient of absolute risk aversion and it has quite often been called curvature in that context. However, in differential geometry curvature is described differently, although it is quite similar. Mas-Collel and others have suggested calling -f’’/f’ the “degree of concavity” instead. I came across this definition on the internet:
:“The degree of concavity is measured by the proportionate rate of decrease of the slope, that is, the rate at which the slope decreases divided by the slope itself.”
The general rationale for using this measure is that it is invariant to scale, whereas the straight second derivative, f’’, is not invariant. The same applies to the second difference of course."
So our measure is the second difference divided by the first difference. However, it is not clear whether we should divide by the initial first difference or the second first difference or the average. I initially assumed that we should use the initial first difference. I now think that is wrong as it can produce anomalies. I think we should use the second (or “current”) first difference as the base.
Here is some data I sent before:
{| class="wikitable" style="text-align:right;"
|- style="background-color:#FFF; color:#222;"
| Layer
| SSR
| D1
| D2
| Concavity
| Concavity
|- style="text-align:left; background-color:#FFF; color:#222;"
| style="text-align:right;" | 1
| style="text-align:right;" | 0
| style="vertical-align:bottom;" |
| style="vertical-align:bottom;" |
| style="vertical-align:bottom;" |
| style="vertical-align:bottom;" |
|- style="background-color:#FFF; color:#222;"
| 2
| 40
| 40
| -5
| 0.13
| 0.14
|- style="background-color:#FFF; color:#222;"
| 3
| 75
| 35
| style="background-color:#FF0;" | -20
| 0.57
| 1.33
|- style="background-color:#FFF; color:#222;"
| 4
| 90
| 15
| -12
| style="background-color:#FF0;" | 0.80
| style="background-color:#FF0;" | 4
|- style="background-color:#FFF; color:#222;"
| 5
| 93
| 3
| -1
| 0.33
| 0.5
|- style="background-color:#FFF; color:#222;"
| 6
| 95
| 2
| -1
| 0.50
| 1
|-
| style="background-color:#FFF; color:#222;" | 7
| style="background-color:#FFF; color:#222;" | 96
| style="background-color:#FFF; color:#222;" | 1
| style="background-color:#FFF; color:#222;" | -1
| style="background-color:#FFF; color:#222;" | 1.00
| style="text-align:left;" |
|}
The column at the far right uses the second first difference as the base, which I now think is correct. The column second from the right uses the first first difference at the base.
Just to be clear, for layer 2 the first difference is 40 – 0 = 40. For layer 3 the first difference is 75 – 40 = 35. Therefore, for layer 2, the second difference is 35 – 40 = -5. I think this is what you would call the “middle second difference”. It tells how sharply the slope falls after the current layer, which is what we want.
To correct for scaling, we need to divide by a first difference. In the first concavity column, for layer 2 I use 5/40 = 0.125. For the last column for layer 2 I use 5/35 = 0.143.
Both approaches have a local max at layer 4, which is what we want. However, the second column from the right has a global max at the last layer, which is certainly not what we want. But is can happen at the end where the increments are very small.
So it seems pretty clear that we want to use the second first difference at the base. More precisely, to get the concavity for layer 3 we want to divide the middle second difference by the forward first difference. (It would probably also be okay to use the middle second difference divided by the middle first difference, but I have not checked that out).
===Version 3.5 build notes===