Applications of heartbeat complexity analysis to depression and bipolar disorder