This file is indexed.

/usr/share/octave/packages/tsa-4.2.7/doc-cache is in octave-tsa 4.2.7-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
# Created by Octave 3.8.0, Mon Feb 24 19:51:10 2014 UTC <root@komainu>
# name: cache
# type: cell
# rows: 3
# columns: 55
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
aar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2191
 Calculates adaptive autoregressive (AAR) and adaptive autoregressive moving average estimates (AARMA)
 of real-valued data series using Kalman filter algorithm.
 [a,e,REV] = aar(y, mode, MOP, UC, a0, A, W, V); 

 The AAR process is described as following  
       y(k) - a(k,1)*y(t-1) -...- a(k,p)*y(t-p) = e(k);
 The AARMA process is described as following  
       y(k) - a(k,1)*y(t-1) -...- a(k,p)*y(t-p) = e(k) + b(k,1)*e(t-1) + ... + b(k,q)*e(t-q);

 Input:
       y       Signal (AR-Process)
       Mode    is a two-element vector [aMode, vMode], 
               aMode determines 1 (out of 12) methods for updating the co-variance matrix (see also [1])
               vMode determines 1 (out of 7) methods for estimating the innovation variance (see also [1])
               aMode=1, vmode=2 is the RLS algorithm as used in [2]
               aMode=-1, LMS algorithm (signal normalized)
               aMode=-2, LMS algorithm with adaptive normalization  
                                     
       MOP     model order, default [10,0] 
               MOP=[p]         AAR(p) model. p AR parameters
               MOP=[p,q]       AARMA(p,q) model, p AR parameters and q MA coefficients
       UC      Update Coefficient, default 0
       a0      Initial AAR parameters [a(0,1), a(0,2), ..., a(0,p),b(0,1),b(0,2), ..., b(0,q)]
                (row vector with p+q elements, default zeros(1,p) )
       A       Initial Covariance matrix (positive definite pxp-matrix, default eye(p))
	W	system noise (required for aMode==0)
	V	observation noise (required for vMode==0)
      
 Output:
       a       AAR(MA) estimates [a(k,1), a(k,2), ..., a(k,p),b(k,1),b(k,2), ..., b(k,q]
       e       error process (Adaptively filtered process)
       REV     relative error variance MSE/MSY


 Hint:
 The mean square (prediction) error of different variants is useful for determining the free parameters (Mode, MOP, UC) 

 REFERENCE(S): 
 [1] A. Schloegl (2000), The electroencephalogram and the adaptive autoregressive model: theory and applications. 
     ISBN 3-8265-7640-3 Shaker Verlag, Aachen, Germany. 

 More references can be found at 
     http://pub.ist.ac.at/~schloegl/publications/



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 Calculates adaptive autoregressive (AAR) and adaptive autoregressive moving ave



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
aarmam


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1372
 Estimating Adaptive AutoRegressive-Moving-Average-and-mean model (includes mean term) 

 !! This function is obsolete and is replaced by AMARMA

 [z,E,REV,ESU,V,Z,SPUR] = aarmam(y, mode, MOP, UC, z0, Z0, V0, W); 
 Estimates AAR parameters with Kalman filter algorithm
 	y(t) = sum_i(a_i(t)*y(t-i)) + m(t) + e(t) + sum_i(b_i(t)*e(t-i))

 State space model
	z(t) = G*z(t-1) + w(t)    w(t)=N(0,W) 
	y(t) = H*z(t)   + v(t)	  v(t)=N(0,V)	

 G = I, 
 z = [m(t),a_1(t-1),..,a_p(t-p),b_1(t-1),...,b_q(t-q)];
 H = [1,y(t-1),..,y(t-p),e(t-1),...,e(t-q)];
 W = E{(z(t)-G*z(t-1))*(z(t)-G*z(t-1))'}
 V = E{(y(t)-H*z(t-1))*(y(t)-H*z(t-1))'}


 Input:
       y	Signal (AR-Process)
       Mode	determines the type of algorithm

       MOP     Model order [m,p,q], default [0,10,0]
			m=1 includes the mean term, m=0 does not. 
			p and q must be positive integers
			it is recommended to set q=0. 
	UC	Update Coefficient, default 0
	z0	Initial state vector
	Z0	Initial Covariance matrix
      
 Output:
	z	AR-Parameter
	E	error process (Adaptively filtered process)
       REV     relative error variance MSE/MSY

 REFERENCE(S): 
 [1] A. Schloegl (2000), The electroencephalogram and the adaptive autoregressive model: theory and applications. 
     ISBN 3-8265-7640-3 Shaker Verlag, Aachen, Germany. 

 More references can be found at 
     http://pub.ist.ac.at/~schloegl/publications/



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 Estimating Adaptive AutoRegressive-Moving-Average-and-mean model (includes mean



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
ac2poly


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 179
 converts the autocorrelation sequence into an AR polynomial
 [A,Efinal] = ac2poly(r)

 see also ACOVF ACORF AR2RC RC2AR DURLEV AC2POLY, POLY2RC, RC2POLY, RC2AC, AC2RC, POLY2AC
 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 converts the autocorrelation sequence into an AR polynomial
 [A,Efinal] = ac2po



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
ac2rc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 182
 converts the autocorrelation function into reflection coefficients 
 [RC,r0] = ac2rc(r)

 see also ACOVF ACORF AR2RC RC2AR DURLEV AC2POLY, POLY2RC, RC2POLY, RC2AC, AC2RC, POLY2AC
 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 converts the autocorrelation function into reflection coefficients 
 [RC,r0] = 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
acorf


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1078
  Calculates autocorrelations for multiple data series.
  Missing values in Z (NaN) are considered. 
  Also calculates Ljung-Box Q stats and p-values.

    [AutoCorr,stderr,lpq,qpval] = acorf(Z,N);
  If mean should be removed use
    [AutoCorr,stderr,lpq,qpval] = acorf(detrend(Z',0)',N);
  If trend should be removed use
    [AutoCorr,stderr,lpq,qpval] = acorf(detrend(Z')',N);

 INPUT
  Z	is data series for which autocorrelations are required
       each in a row
  N	maximum lag

 OUTPUT
  AutoCorr nr x N matrix of autocorrelations
  stderr   nr x N matrix of (approx) std errors
  lpq      nr x M matrix of Ljung-Box Q stats
  qpval    nr x N matrix of p-values on Q stats
   
 All input and output parameters are organized in rows, one row 
 corresponds to one series

 REFERENCES:
  S. Haykin "Adaptive Filter Theory" 3ed. Prentice Hall, 1996.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.
  J.S. Bendat and A.G.Persol "Random Data: Analysis and Measurement procedures", Wiley, 1986.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
  Calculates autocorrelations for multiple data series.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
acovf


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 827
 ACOVF estimates autocovariance function (not normalized)
 NaN's are interpreted as missing values. 

 [ACF,NN] = acovf(Z,MAXLAG,Mode);

 Input:
  Z    Signal (one channel per row);
  MAXLAG  maximum lag
  Mode	'biased'  : normalizes with N [default]
	'unbiased': normalizes with N-lag
	'coeff'	  : normalizes such that lag 0 is 1	
        others	  : no normalization

 Output:
  ACF autocovariance function
  NN  number of valid elements 

 REFERENCES:
  A.V. Oppenheim and R.W. Schafer, Digital Signal Processing, Prentice-Hall, 1975.
  S. Haykin "Adaptive Filter Theory" 3ed. Prentice Hall, 1996.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.
  J.S. Bendat and A.G.Persol "Random Data: Analysis and Measurement procedures", Wiley, 1986.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 ACOVF estimates autocovariance function (not normalized)
 NaN's are interpreted



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
adim


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 675
 ADIM adaptive information matrix. Estimates the inverse
   correlation matrix in an adaptive way. 

 [IR, CC] = adim(U, UC [, IR0 [, CC0]]); 
   U 	input data  
   UC 	update coefficient 0 < UC << 1
   IR0	initial information matrix
   CC0 initial correlation matrix
   IR	information matrix (inverse correlation matrix)
   CC  correlation matrix
 	
  The algorithm uses the Matrix Inversion Lemma, also known as 
     "Woodbury's identity", to obtain a recursive algorithm.  
     IR*CC - UC*I should be approx. zero. 

 Reference(s):
 [1] S. Haykin. Adaptive Filter Theory, Prentice Hall, Upper Saddle River, NJ, USA 
     pp. 565-567, Equ. (13.16), 1996.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
 ADIM adaptive information matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
amarma


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2356
 Adaptive Mean-AutoRegressive-Moving-Average model estimation
 [z,e,ESU,REV,V,Z,SPUR] = amarma(y, mode, MOP, UC, z0, Z0, V0, W); 

 Estimates model parameters (mean and AR) with Kalman filter algorithm
 	y(t) = sum_i(a(i,t)*y(t-i)) + mu(t) + e(t)
 or the more general adaptive mean-autoregressive-moving-avarage parameters
 	y(t) = sum_i(a(i,t)*y(t-i)) + mu(t) + e(t) + sum_i(b(i,t)*e(t-i)) 

 State space model:
	z(t)=G*z(t-1) + w(t)      w(t)=N(0,W) 
	y(t)=H*z(t)   + v(t)	  v(t)=N(0,V)	

 G = I, (identity matrix)
 z = [mu(t)/(1-sum_i(a(i,t))),a_1(t-1),..,a_p(t-p),b_1(t-1),...,b_q(t-q)];
 H = [1,y(t-1),..,y(t-p),e(t-1),...,e(t-q)];
 W = E{(z(t)-G*z(t-1))*(z(t)-G*z(t-1))'}
 V = E{(y(t)-H*z(t-1))*(y(t)-H*z(t-1))'}
 v = e

 Input:
       y	Signal (AR-Process)
       Mode
	    [0,0] uses V0 and W  

       MOP     Model order [m,p,q], default [0,10,0] 
		   m=1 includes the mean term, m=0 does not. 
		   p and q must be positive integers
		   it is recommended to set q=0 (i.e. no moving average part)
		   because the optimization problem for ARMA models is 
		   non-linear and can have local optima. 
	UC	Update Coefficient, default 0
	z0	Initial state vector
	Z0	Initial Covariance matrix
      
 Output:
	z	mean-autoregressive-moving-average-parameter
               mu(t)  = z(t,1:m)	adaptive mean
               a(t,:) = z(t,m+[1:p])	adaptive autoregressive parameters
               b(t,:) = z(t,m+p+[1:q]) adaptive moving average parameters
	e	error process (Adaptively filtered process)
       REV     relative error variance MSE/MSY


 see also: AAR

 REFERENCE(S): 
 [1] A. Schlögl (2000), The electroencephalogram and the adaptive autoregressive model: theory and applications. 
     ISBN 3-8265-7640-3 Shaker Verlag, Aachen, Germany. 
 [2] Schlögl A, Lee FY, Bischof H, Pfurtscheller G
     Characterization of Four-Class Motor Imagery EEG Data for the BCI-Competition 2005.
     Journal of neural engineering 2 (2005) 4, S. L14-L22
 [3] A. Schlögl , J. Fortin, W. Habenbacher, M. Akay.
     Adaptive mean and trend removal of heart rate variability using Kalman filtering
     Proceedings of the 23rd Annual International Conference of the IEEE Engineering in Medicine and Biology Society, 
     25-28 Oct. 2001, Paper #1383, ISBN 0-7803-7213-1.

 More references can be found at 
     http://pub.ist.ac.at/~schloegl/publications/



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 Adaptive Mean-AutoRegressive-Moving-Average model estimation
 [z,e,ESU,REV,V,Z,



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
ar2poly


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 603
 converts autoregressive parameters into AR polymials 
 Multiple polynomials can be converted. 
 function  [A] = ar2poly(AR);

  INPUT:
 AR     AR parameters, each row represents one set of AR parameters

  OUTPUT
 A     denominator polynom


 see also ACOVF ACORF DURLEV RC2AR FILTER FREQZ ZPLANE
 
 REFERENCES:
  P.J. Brockwell and R. A. Davis "Time Series: Theory and Methods", 2nd ed. Springer, 1991.
  S. Haykin "Adaptive Filter Theory" 3rd ed. Prentice Hall, 1996.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 converts autoregressive parameters into AR polymials 
 Multiple polynomials can



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
ar2rc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1007
 converts autoregressive parameters into reflection coefficients 
 with the Durbin-Levinson recursion for multiple channels
 function  [AR,RC,PE] = ar2rc(AR);
 function  [MX,PE] = ar2rc(AR);

  INPUT:
 AR    autoregressive model parameter	

  OUTPUT
 AR    autoregressive model parameter	
 RC    reflection coefficients (= -PARCOR coefficients)
 PE    remaining error variance (relative to PE(1)=1)
 MX    transformation matrix between ARP and RC (Attention: needs O(p^2) memory)
        AR = MX(:,K*(K-1)/2+(1:K));
        RC = MX(:,(1:K).*(2:K+1)/2);

 All input and output parameters are organized in rows, one row 
 corresponds to the parameters of one channel

 see also ACOVF ACORF DURLEV RC2AR 
 
 REFERENCES:
  P.J. Brockwell and R. A. Davis "Time Series: Theory and Methods", 2nd ed. Springer, 1991.
  S. Haykin "Adaptive Filter Theory" 3rd ed. Prentice Hall, 1996.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 converts autoregressive parameters into reflection coefficients 
 with the Durb



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
ar_spa


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1259
 AR_SPA decomposes an AR-spectrum into its compontents 
 [w,A,B,R,P,F,ip] = ar_spa(AR,fs,E);

  INPUT:
 AR   autoregressive parameters
 fs    sampling rate, provide w and B in [Hz], if not given the result is in radians 
 E     noise level (mean square),  gives A and F in units of E, if not given as relative amplitude

  OUTPUT
 w	center frequency
 A     Amplitude
 B     bandwidth
       - less important output parameters - 
 R	residual
 P	poles
 ip	number of complex conjugate poles
 real(F)     	power, absolute values are obtained by multiplying with noise variance E(p+1) 
 imag(F)	assymetry, - " -

 All input and output parameters are organized in rows, one row 
 corresponds to the parameters of one channel

 see also ACOVF ACORF DURLEV IDURLEV PARCOR YUWA 
 
 REFERENCES:
 [1] Zetterberg L.H. (1969) Estimation of parameter for linear difference equation with application to EEG analysis. Math. Biosci., 5, 227-275. 
 [2] Isaksson A. and Wennberg, A. (1975) Visual evaluation and computer analysis of the EEG - A comparison. Electroenceph. clin. Neurophysiol., 38: 79-86.
 [3] G. Florian and G. Pfurtscheller (1994) Autoregressive model based spectral analysis with application to EEG. IIG - Report Series, University of Technolgy Graz, Austria.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 AR_SPA decomposes an AR-spectrum into its compontents 
 [w,A,B,R,P,F,ip] = ar_s



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
arcext


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 738
 ARCEXT extracts AR and RC of order P from Matrix MX
 function  [AR,RC] = arcext(MX,P);

  INPUT:
 MX 	AR and RC matrix calculated by durlev 
 P 	model order (default maximum possible)

  OUTPUT
 AR    autoregressive model parameter	
 RC    reflection coefficients (= -PARCOR coefficients)

 All input and output parameters are organized in rows, one row 
 corresponds to the parameters of one channel

 see also ACOVF ACORF DURLEV 
 
 REFERENCES:
  P.J. Brockwell and R. A. Davis "Time Series: Theory and Methods", 2nd ed. Springer, 1991.
  S. Haykin "Adaptive Filter Theory" 3rd ed. Prentice Hall, 1996.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 ARCEXT extracts AR and RC of order P from Matrix MX
 function  [AR,RC] = arcext



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
arfit2


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1227
 ARFIT2 estimates multivariate autoregressive parameters
 of the MVAR process Y

   Y(t,:)' = w' + A1*Y(t-1,:)' + ... + Ap*Y(t-p,:)' + x(t,:)'

 ARFIT2 uses the Nutall-Strand method (multivariate Burg algorithm) 
 which provides better estimates the ARFIT [1], and uses the 
 same arguments. Moreover, ARFIT2 is faster and can deal with 
 missing values encoded as NaNs. 

 [w, A, C, sbc, fpe] = arfit2(v, pmin, pmax, selector, no_const)

 INPUT: 
  v		data - each channel in a column
  pmin, pmax 	minimum and maximum model order
  selector	'fpe' or 'sbc' [default] 
  no_const	'zero' indicates no bias/offset need to be estimated 
		in this case is w = [0, 0, ..., 0]'; 

 OUTPUT: 
  w		mean of innovation noise
  A		[A1,A2,...,Ap] MVAR estimates	
  C		covariance matrix of innovation noise
  sbc, fpe	criteria for model order selection 

 see also: ARFIT, MVAR

 REFERENCES:
  [1] A. Schloegl, 2006, Comparison of Multivariate Autoregressive Estimators.
       Signal processing, p. 2426-9.
  [2] T. Schneider and A. Neumaier, 2001. 
	Algorithm 808: ARFIT-a Matlab package for the estimation of parameters and eigenmodes 
	of multivariate autoregressive models. ACM-Transactions on Mathematical Software. 27, (Mar.), 58-65.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 79
 ARFIT2 estimates multivariate autoregressive parameters
 of the MVAR process Y



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
biacovf


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 228
 BiAutoCovariance function 
 [BiACF] = biacovf(Z,N);

 Input:	Z    Signal
		N  # of coefficients
 Output:	BIACF bi-autocorrelation function (joint cumulant 3rd order
 Output:	ACF   covariance function (joint cumulant 2nd order)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
 BiAutoCovariance function 
 [BiACF] = biacovf(Z,N);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
bisdemo


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
 BISDEMO (script) Shows BISPECTRUM of eeg8s.mat



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
 BISDEMO (script) Shows BISPECTRUM of eeg8s.mat




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
bispec


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 382
 Calculates Bispectrum 
 [BISPEC] = bispec(Z,N);

 Input:	Z    Signal
		N  # of coefficients
 Output:	BiACF  bi-autocorrelation function = 3rd order cumulant
		BISPEC Bi-spectrum 

 Reference(s):
 C.L. Nikias and A.P. Petropulu "Higher-Order Spectra Analysis" Prentice Hall, 1993.
 M.B. Priestley, "Non-linear and Non-stationary Time series Analysis", Academic Press, London, 1988.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
 Calculates Bispectrum 
 [BISPEC] = bispec(Z,N);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
content


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1811
 Time Series Analysis (Ver 3.10)
 Schloegl A. (1996-2003,2008) Time Series Analysis - A Toolbox for the use with Matlab. 
 WWW: http://pub.ist.ac.at/~schloegl/matlab/tsa/

	$Id: content.m 11693 2013-03-04 06:40:14Z schloegl $
	Copyright (C) 1996-2003,2008 by Alois Schloegl <a.schloegl@ieee.org>

  Time Series Analysis - a toolbox for the use with Matlab
   aar		adaptive autoregressive estimator 
   acovf       (*) Autocovariance function
   acorf (acf)	(*) autocorrelation function	
   pacf	(*) partial autocorrelation function, includes signifcance test and confidence interval
   parcor	(*) partial autocorrelation function
   biacovf	biautocovariance function (3rd order cumulant)
   bispec	Bi-spectrum 
   durlev      (*) solves Yule-Walker equation - converts ACOVF into AR parameters
   lattice     (*) calcultes AR parameters with lattice method
   lpc		(*) calculates the prediction coefficients form a given time series
   invest0	(*) a prior investigation (used by invest1)
   invest1	(*) investigates signal (useful for 1st evaluation of the data)
   selmo	(*) Select Order of Autoregressive model using different criteria
   histo	(*) histogram
   hup     	(*) test Hurwitz polynomials
   ucp     	(*) test Unit Circle Polynomials   
   y2res	(*) computes mean, variance, skewness, kurtosis, entropy, etc. from data series 
   ar_spa	(*) spectral analysis based on the autoregressive model
   detrend 	(*) removes trend, can handle missing values, non-equidistant sampled data       
   flix	floating index, interpolates data for non-interger indices
   quantiles   calculates quantiles 

 Multivariate analysis (planned in future)
   mvar	multivariate (vector) autoregressive estimation 
   mvfilter	multivariate filter
   arfit2	provides compatibility to ARFIT [Schneider and Neumaier, 2001]



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
 Time Series Analysis (Ver 3.10)
 Schloegl A.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
contents


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5879
 Time Series Analysis - A toolbox for the use with Matlab and Octave. 

 $Id: contents.m 11693 2013-03-04 06:40:14Z schloegl $
 Copyright (C) 1996-2004,2008 by Alois Schloegl <a.schloegl@ieee.org>
% WWW: http://pub.ist.ac.at/~schloegl/matlab/tsa/

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 

  Time Series Analysis - a toolbox for the use with Matlab
   aar		adaptive autoregressive estimator 
   acovf       (*) Autocovariance function
   acorf (acf)	(*) autocorrelation function	
   pacf	(*) partial autocorrelation function, includes signifcance test and confidence interval
   parcor	(*) partial autocorrelation function
   biacovf	biautocovariance function (3rd order cumulant)
   bispec	Bi-spectrum 
   durlev      (*) solves Yule-Walker equation - converts ACOVF into AR parameters
   lattice     (*) calcultes AR parameters with lattice method
   lpc		(*) calculates the prediction coefficients form a given time series
   invest0	(*) a prior investigation (used by invest1)
   invest1	(*) investigates signal (useful for 1st evaluation of the data)
   rmle        AR estimation using recursive maximum likelihood function 
   selmo	(*) Select Order of Autoregressive model using different criteria
   histo	(*) histogram
   hup     	(*) test Hurwitz polynomials
   ucp     	(*) test Unit Circle Polynomials   
   y2res	(*) computes mean, variance, skewness, kurtosis, entropy, etc. from data series 
   ar_spa	(*) spectral analysis based on the autoregressive model
   detrend 	(*) removes trend, can handle missing values, non-equidistant sampled data       
   flix	floating index, interpolates data for non-interger indices


 Multivariate analysis 
   adim	adaptive information matrix (inverse correlation matrix) 
   mvar	multivariate (vector) autoregressive estimation 
   mvaar       multivariate adaptvie autoregressive estimation using Kalman filtering
   mvfilter	multivariate filter
   mvfreqz	multivariate spectra 	
   arfit2	provides compatibility to ARFIT [Schneider and Neumaier, 2001]

   	
  Conversions between Autocorrelation (AC), Autoregressive parameters (AR), 
             	prediction polynom (POLY) and Reflection coefficient (RC)  
   ac2poly 	(*) transforms autocorrelation into prediction polynom
   ac2rc   	(*) transforms autocorrelation into reflexion coefficients
   ar2rc	(*) transforms autoregressive parameters into reflection coefficients  
   rc2ar	(*) transforms reflection coefficients into autoregressive parameters
   poly2ac 	(*) transforms polynom to autocorrelation
   poly2ar 	(*) transforms polynom to AR 
   poly2rc 	(*) 
   rc2ac 	(*) 
   rc2poly 	(*) 
   ar2poly 	(*) 
   
 Utility functions 
   sinvest1	shows the parameter calculated by INVEST1

 Test suites
   tsademo		demonstrates INVEST1 on EEG data
   invfdemo		demonstration of matched, inverse filtering
   bisdemo		demonstrates bispectral estimation

 (*) indicates univariate analysis of multiple data series (each in a row) can be processed.
 (-) indicates that these functions will be removed in future 

 REFERENCES (sources):
  http://www.itl.nist.gov/
  http://mathworld.wolfram.com/
  P.J. Brockwell and R.A. Davis "Time Series: Theory and Methods", 2nd ed. Springer, 1991.
  O.   Foellinger "Lineare Abtastsysteme", Oldenburg Verlag, Muenchen, 1986.
  F.   Gausch "Systemtechnik", Textbook, University of Technology Graz, 1993. 
  M.S. Grewal and A.P. Andrews "Kalman Filtering" Prentice Hall, 1993. 
  S.   Haykin "Adaptive Filter Theory" 3ed. Prentice Hall, 1996.
  E.I. Jury "Theory and Application of the z-Transform Method", Robert E. Krieger Publishing Co., 1973. 
  M.S. Kay "Modern Spectal Estimation" Prentice Hall, 1988. 
  Ch.  Langraf and G. Schneider "Elemente der Regeltechnik", Springer Verlag, 1970.
  S.L. Marple "Digital Spetral Analysis with Applications" Prentice Hall, 1987.
  C.L. Nikias and A.P. Petropulu "Higher-Order Spectra Analysis" Prentice Hall, 1993.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  T. Schneider and A. Neumaier "Algorithm 808: ARFIT - a matlab package for the estimation of parameters and eigenmodes of multivariate autoregressive models" 
               ACM Transactions on Mathematical software, 27(Mar), 58-65.
  C.E. Shannon and W. Weaver "The mathematical theory of communication" University of Illinois Press, Urbana 1949 (reprint 1963).
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.
 
 
 REFERENCES (applications):
 [1] A. Schlögl, B. Kemp, T. Penzel, D. Kunz, S.-L. Himanen,A. Värri, G. Dorffner, G. Pfurtscheller.
     Quality Control of polysomnographic Sleep Data by Histogram and Entropy Analysis. 
     Clin. Neurophysiol. 1999, Dec; 110(12): 2165 - 2170.
 [2] Penzel T, Kemp B, Klösch G, Schlögl A, Hasan J, Varri A, Korhonen I.
     Acquisition of biomedical signals databases
     IEEE Engineering in Medicine and Biology Magazine 2001, 20(3): 25-32
 [3] Alois Schlögl (2000)
     The electroencephalogram and the adaptive autoregressive model: theory and applications
     Shaker Verlag, Aachen, Germany,(ISBN3-8265-7640-3). 

 Features:
 - Multiple Signal Processing
 - Efficient algorithms 
 - Model order selection tools
 - higher (3rd) order analysis
 - Maximum entropy spectral estimation
 - can deal with missing values (NaN's)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
 Time Series Analysis - A toolbox for the use with Matlab and Octave.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
covm


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1182
 COVM generates covariance matrix
 X and Y can contain missing values encoded with NaN.
 NaN's are skipped, NaN do not result in a NaN output. 
 The output gives NaN only if there are insufficient input data

 COVM(X,Mode);
      calculates the (auto-)correlation matrix of X
 COVM(X,Y,Mode);
      calculates the crosscorrelation between X and Y
 COVM(...,W);
	weighted crosscorrelation 

 Mode = 'M' minimum or standard mode [default]
 	C = X'*X; or X'*Y correlation matrix

 Mode = 'E' extended mode
 	C = [1 X]'*[1 X]; % l is a matching column of 1's
 	C is additive, i.e. it can be applied to subsequent blocks and summed up afterwards
 	the mean (or sum) is stored on the 1st row and column of C

 Mode = 'D' or 'D0' detrended mode
	the mean of X (and Y) is removed. If combined with extended mode (Mode='DE'), 
 	the mean (or sum) is stored in the 1st row and column of C. 
 	The default scaling is factor (N-1). 
 Mode = 'D1' is the same as 'D' but uses N for scaling. 

 C = covm(...); 
 	C is the scaled by N in Mode M and by (N-1) in mode D.
 [C,N] = covm(...);
	C is not scaled, provides the scaling factor N  
	C./N gives the scaled version. 

 see also: DECOVM, XCOVF



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 COVM generates covariance matrix
 X and Y can contain missing values encoded wi



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
detrend


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 837
 DETREND removes the trend from data, NaN's are considered as missing values
 
 DETREND is fully compatible to previous Matlab and Octave DETREND with the following features added:
 - handles NaN's by assuming that these are missing values
 - handles unequally spaced data
 - second output parameter gives the trend of the data
 - compatible to Matlab and Octave 

 [...]=detrend([t,] X [,p])
	removes trend for unequally spaced data
	t represents the time points
	X(i) is the value at time t(i)
	p must be a scalar

 [...]=detrend(X,0)
 [...]=detrend(X,'constant')
	removes the mean

 [...]=detrend(X,p)
	removes polynomial of order p (default p=1)

 [...]=detrend(X,1) - default
 [...]=detrend(X,'linear')
	removes linear trend 

 [X,T]=detrend(...) 

 X is the detrended data
 T is the removed trend
 
 see also: SUMSKIPNAN, ZSCORE		



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 DETREND removes the trend from data, NaN's are considered as missing values
 
 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
durlev


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1241
 function  [AR,RC,PE] = durlev(ACF);
 function  [MX,PE] = durlev(ACF);
 estimates AR(p) model parameter by solving the
 Yule-Walker with the Durbin-Levinson recursion
 for multiple channels
  INPUT:
 ACF	Autocorrelation function from lag=[0:p]

  OUTPUT
 AR    autoregressive model parameter	
 RC    reflection coefficients (= -PARCOR coefficients)
 PE    remaining error variance
 MX    transformation matrix between ARP and RC (Attention: needs O(p^2) memory)
        AR(:,K) = MX(:,K*(K-1)/2+(1:K));
        RC(:,K) = MX(:,(1:K).*(2:K+1)/2);

 All input and output parameters are organized in rows, one row 
 corresponds to the parameters of one channel

 see also ACOVF ACORF AR2RC RC2AR LATTICE
 
 REFERENCES:
  Levinson N. (1947) "The Wiener RMS(root-mean-square) error criterion in filter design and prediction." J. Math. Phys., 25, pp.261-278.
  Durbin J. (1960) "The fitting of time series models." Rev. Int. Stat. Inst. vol 28., pp 233-244.
  P.J. Brockwell and R. A. Davis "Time Series: Theory and Methods", 2nd ed. Springer, 1991.
  S. Haykin "Adaptive Filter Theory" 3rd ed. Prentice Hall, 1996.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 function  [AR,RC,PE] = durlev(ACF);
 function  [MX,PE] = durlev(ACF);
 estimate



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
flag_implicit_samplerate


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 135
 The use of FLAG_IMPLICIT_SAMPLERATE is in experimental state. 
 FLAG_IMPLICIT_SAMPLERATE might even become obsolete.
 Do not use it. 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
 The use of FLAG_IMPLICIT_SAMPLERATE is in experimental state.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
flag_implicit_skip_nan


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 943
 FLAG_IMPLICIT_SKIP_NAN sets and gets default mode for handling NaNs
	1 skips NaN's (the default mode if no mode is set)
 	0 NaNs are propagated; input NaN's give NaN's at the output
 
 FLAG = flag_implicit_skip_nan()
 	gets current mode

 flag_implicit_skip_nan(FLAG)
    % sets mode 

 prevFLAG = flag_implicit_skip_nan(nextFLAG)
	gets previous set FLAG and sets FLAG for the future
 flag_implicit_skip_nan(prevFLAG)
	resets FLAG to previous mode

 It is used in: 
	SUMSKIPNAN, MEDIAN, QUANTILES, TRIMEAN
 and affects many other functions like: 
	CENTER, KURTOSIS, MAD, MEAN, MOMENT, RMS, SEM, SKEWNESS, 
	STATISTIC, STD, VAR, ZSCORE etc. 

 The mode is stored in the global variable FLAG_implicit_skip_nan
 It is recommended to use flag_implicit_skip_nan(1) as default and
 flag_implicit_skip_nan(0) should be used for exceptional cases only.
 This feature might disappear without further notice, so you should really not
 rely on it. 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 FLAG_IMPLICIT_SKIP_NAN sets and gets default mode for handling NaNs
	1 skips Na



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
flix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 603
 floating point index - interpolates data in case of non-integer indices

 Y=flix(D,x)
   FLIX returns Y=D(x) if x is an integer 
   otherwise D(x) is interpolated from the neighbors D(ceil(x)) and D(floor(x)) 
 
 Applications: 
 (1)  discrete Dataseries can be upsampled to higher sampling rate   
 (2)  transformation of non-equidistant samples to equidistant samples
 (3)  [Q]=flix(sort(D),q*(length(D)+1)) calculates the q-quantile of data series D   

 FLIX(D,x) is the same as INTERP1(D,X,'linear'); Therefore, FLIX might
 become obsolete in future. 

 see also: HIST2RES, Y2RES, PLOTCDF, INTERP1



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
 floating point index - interpolates data in case of non-integer indices



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
histo


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 587
 HISTO calculates histogram for each column
 [H,X] = HISTO(Y,Mode)
 	   
   Mode 
	'rows' : frequency of each row
	'1x'   : single bin-values 
	'nx'   : separate bin-values for each column
   X  are the bin-values 
   H  is the frequency of occurence of value X 

 HISTO(Y) with no output arguments:
	plots the histogram bar(X,H)

 more histogram-based results can be obtained by HIST2RES2  

 see also:  HISTO, HISTO2, HISTO3, HISTO4

 REFERENCE(S):
  C.E. Shannon and W. Weaver "The mathematical theory of communication" University of Illinois Press, Urbana 1949 (reprint 1963).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 HISTO calculates histogram for each column
 [H,X] = HISTO(Y,Mode)
 	   
   Mod



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
histo2


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1009
 HISTO2 calculates histogram for multiple columns with separate bin values 
    for each data column.

 R = HISTO2(Y)
 R = HISTO2(Y, W)
	Y	data
	W	weight vector containing weights of each sample, 
		number of rows of Y and W must match.
		default W=[] indicates that each sample is weighted with 1. 

 R = HISTO(...)            
 	R is 	a struct with th fields 
       R.X  	the bin-values, bin-values are computed separately for each 
		data column, thus R.X is a matrix, each column contains the 
		the bin values of for each data column, unused elements are indicated with NaN.
		In order to have common bin values, use HISTO3.  
       R.H  is the frequency of occurence of value X 
  	R.N  are the number of valid (not NaN) samples (i.e. sum of weights)

 more histogram-based results can be obtained by HIST2RES2  

 see also: HISTO, HISTO2, HISTO3, HISTO4

 REFERENCE(S):
  C.E. Shannon and W. Weaver "The mathematical theory of communication" University of Illinois Press, Urbana 1949 (reprint 1963).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 HISTO2 calculates histogram for multiple columns with separate bin values 
    



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
histo3


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1266
 HISTO3 calculates histogram for multiple columns with common bin values 
    among all data columns, and can be useful for data compression. 

 R = HISTO3(Y)
 R = HISTO3(Y, W)
	Y	data
	W	weight vector containing weights of each sample, 
		number of rows of Y and W must match.
		default W=[] indicates that each sample is weighted with 1. 
 	R 	struct with these fields 
       R.X  	the bin-values, bin-values are equal for each channel
		thus R.X is a column vector. If bin values should 
		be computed separately for each data column, use HISTO2
       R.H  	is the frequency of occurence of value X 
  	R.N  	are the number of valid (not NaN) samples 

 Data compression can be performed in this way
   	[R,tix] = histo3(Y) 
      		is the compression step

	R.tix provides a compressed data representation. 
	R.compressionratio estimates the compression ratio

 	R.X(tix) and R.X(R.tix) 
		reconstruct the orginal signal (decompression) 

 The effort (in memory and speed) for compression is O(n*log(n)).
 The effort (in memory and speed) for decompression is O(n) only. 

 see also: HISTO, HISTO2, HISTO3, HISTO4

 REFERENCE(S):
  C.E. Shannon and W. Weaver "The mathematical theory of communication" University of Illinois Press, Urbana 1949 (reprint 1963).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 HISTO3 calculates histogram for multiple columns with common bin values 
    am



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
histo4


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 965
 HISTO4 calculates histogram of multidimensional data samples 
   and supports data compression

 R = HISTO4(Y)
 R = HISTO4(Y, W)
	Y    data: on sample per row, each sample has with size(Y,2) elements 
	W    weights of each sample (default: [])
	     W = [] indicates that each sample has equal weight	
 	R is a struct with these fields: 
       R.X  are the bin-values 
       R.H  is the frequency of occurence of value X (weighted with W)
  	R.N  are the total number of samples (or sum of W)

 HISTO4 might be useful for data compression, because
 [R,tix] = histo4(Y) 
     	is the compression step
 R.X(tix,:) 
  	is the decompression step

 The effort (in memory and speed) for compression is O(n*log(n))
 The effort (in memory and speed) for decompression is only O(n)
 
 see also: HISTO, HISTO2, HISTO3, HISTO4

 REFERENCE(S):
  C.E. Shannon and W. Weaver 'The mathematical theory of communication' University of Illinois Press, Urbana 1949 (reprint 1963).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 HISTO4 calculates histogram of multidimensional data samples 
   and supports d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
hup


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 588
HUP(C)	tests if the polynomial C is a Hurwitz-Polynomial.
	It tests if all roots lie in the left half of the complex
	plane 
       B=hup(C) is the same as 
       B=all(real(roots(c))<0) but much faster.
	The Algorithm is based on the Routh-Scheme.
	C are the elements of the Polynomial
	C(1)*X^N + ... + C(N)*X + C(N+1).

       HUP2 works also for multiple polynomials, 
       each row a poly - Yet not tested

 REFERENCES:
  F. Gausch "Systemtechnik", Textbook, University of Technology Graz, 1993. 
  Ch. Langraf and G. Schneider "Elemente der Regeltechnik", Springer Verlag, 1970.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
HUP(C)	tests if the polynomial C is a Hurwitz-Polynomial.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
invest0


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 842
 First Investigation of a signal (time series) - automated part
 [AutoCov,AutoCorr,ARPMX,E,ACFsd,NC]=invest0(Y,Pmax);

 [AutoCov,AutoCorr,ARPMX,E,ACFsd,NC]=invest0(AutoCov,Pmax,Mode);
 

 Y	time series
 Pmax	maximal order (optional)

 AutoCov	Autocorrelation 
 AutoCorr	normalized Autocorrelation
 PartACF	Partial Autocorrelation
 ARPMX     Autoregressive Parameter for order Pmax-1
 E	        Error function E(p)
 NC            Number of values (length-missing values)

 REFERENCES:
  P.J. Brockwell and R.A. Davis "Time Series: Theory and Methods", 2nd ed. Springer, 1991.
  M.S. Grewal and A.P. Andrews "Kalman Filtering" Prentice Hall, 1993. 
  S. Haykin "Adaptive Filter Theory" 3ed. Prentice Hall, 1996.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 First Investigation of a signal (time series) - automated part
 [AutoCov,AutoCo



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
invest1


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1306
 First Investigation of a signal (time series) - interactive
 [AutoCov,AutoCorr,ARPMX,E,CRITERIA,MOPS]=invest1(Y,Pmax,show);

 Y	time series
 Pmax	maximal order (optional)
 show  optional; if given the parameters are shown

 AutoCov	Autocorrelation 
 AutoCorr	normalized Autocorrelation
 PartACF	Partial Autocorrelation
 E	Error function E(p)
 CRITERIA curves of the various (see below) criteria, 
 MOPS=[optFPE optAIC optBIC optSBC optMDL optCAT optPHI];
      optimal model order according to various criteria

 FPE	Final Prediction Error (Kay, 1987)
 AIC	Akaike Information Criterion (Marple, 1987)
 BIC	Bayesian Akaike Information Criterion (Wei, 1994)
 SBC	Schwartz's Bayesian Criterion (Wei, 1994)
 MDL	Minimal Description length Criterion (Marple, 1987)
 CAT	Parzen's CAT Criterion (Wei, 1994)
 PHI	Phi criterion (Pukkila et al. 1988)
 minE		order where E is minimal

 REFERENCES:
  P.J. Brockwell and R.A. Davis "Time Series: Theory and Methods", 2nd ed. Springer, 1991.
  S.   Haykin "Adaptive Filter Theory" 3ed. Prentice Hall, 1996.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  C.E. Shannon and W. Weaver "The mathematical theory of communication" University of Illinois Press, Urbana 1949 (reprint 1963).
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 First Investigation of a signal (time series) - interactive
 [AutoCov,AutoCorr,



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
invfdemo


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
 invfdemo	demonstrates Inverse Filtering



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
 invfdemo	demonstrates Inverse Filtering




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
lattice


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1531
 Estimates AR(p) model parameter with lattice algorithm (Burg 1968) 
 for multiple channels. 
 If you have the NaN-tools, LATTICE.M can handle missing values (NaN), 

 [...] = lattice(y [,Pmax [,Mode]]);

 [AR,RC,PE] = lattice(...);
 [MX,PE] = lattice(...);

  INPUT:
 y	signal (one per row), can contain missing values (encoded as NaN)
 Pmax	max. model order (default size(y,2)-1))
 Mode  'BURG' (default) Burg algorithm
	'GEOL' geometric lattice

  OUTPUT
 AR    autoregressive model parameter	
 RC    reflection coefficients (= -PARCOR coefficients)
 PE    remaining error variance
 MX    transformation matrix between ARP and RC (Attention: needs O(p^2) memory)
        AR(:,K) = MX(:, K*(K-1)/2+(1:K)); = MX(:,sum(1:K-1)+(1:K)); 
        RC(:,K) = MX(:,cumsum(1:K));      = MX(:,(1:K).*(2:K+1)/2);

 All input and output parameters are organized in rows, one row 
 corresponds to the parameters of one channel

 see also ACOVF ACORF AR2RC RC2AR DURLEV SUMSKIPNAN 
 
 REFERENCE(S):
  J.P. Burg, "Maximum Entropy Spectral Analysis" Proc. 37th Meeting of the Society of Exp. Geophysiscists, Oklahoma City, OK 1967
  J.P. Burg, "Maximum Entropy Spectral Analysis" PhD-thesis, Dept. of Geophysics, Stanford University, Stanford, CA. 1975.
  P.J. Brockwell and R. A. Davis "Time Series: Theory and Methods", 2nd ed. Springer, 1991.
  S.   Haykin "Adaptive Filter Theory" 3rd ed. Prentice Hall, 1996.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 Estimates AR(p) model parameter with lattice algorithm (Burg 1968) 
 for multip



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
lpc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 759
 LPC Linear prediction coefficients 
 The Burg-method is used to estimate the prediction coefficients

 A = lpc(Y [,P]) finds the coefficients  A=[ 1 A(2) ... A(N+1) ],
     	of an Pth order forward linear predictor
     
 	 Xp(n) = -A(2)*X(n-1) - A(3)*X(n-2) - ... - A(N+1)*X(n-P)
	    
 	such that the sum of the squares of the errors
		
       err(n) = X(n) - Xp(n)
	       
	is minimized.  X can be a vector or a matrix.  If X is a matrix
       containing a separate signal in each column, LPC returns a model
	estimate for each column in the rows of A. N specifies the order
	of the polynomial A(z).
				       
	If you do not specify a value for P, LPC uses a default P = length(X)-1.


 see also ACOVF ACORF AR2POLY RC2AR DURLEV SUMSKIPNAN LATTICE 
 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 LPC Linear prediction coefficients 
 The Burg-method is used to estimate the pr



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
mvaar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 784
 Multivariate (Vector) adaptive AR estimation base on a multidimensional
 Kalman filer algorithm. A standard VAR model (A0=I) is implemented. The 
 state vector is defined as X=(A1|A2...|Ap) and x=vec(X')

 [x,e,Kalman,Q2] = mvaar(y,p,UC,mode,Kalman)

 The standard MVAR model is defined as:

		y(n)-A1(n)*y(n-1)-...-Ap(n)*y(n-p)=e(n)

	The dimension of y(n) equals s 
	
	Input Parameters:

 		y			Observed data or signal 
 		p			prescribed maximum model order (default 1)
		UC			update coefficient	(default 0.001)
		mode	 	update method of the process noise covariance matrix 0...4 ^
					correspond to S0...S4 (default 0)

	Output Parameters

		e			prediction error of dimension s
		x			state vector of dimension s*s*p
		Q2			measurement noise covariance matrix of dimension s x s




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 Multivariate (Vector) adaptive AR estimation base on a multidimensional
 Kalman



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
mvar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3018
 MVAR estimates parameters of the Multi-Variate AutoRegressive model 

    Y(t) = Y(t-1) * A1 + ... + Y(t-p) * Ap + X(t);  
 whereas
    Y(t) is a row vecter with M elements Y(t) = y(t,1:M) 

 Several estimation algorithms are implemented, all estimators 
 can handle data with missing values encoded as NaNs.  

 	[AR,RC,PE] = mvar(Y, p);
 	[AR,RC,PE] = mvar(Y, p, Mode);
 
 with 
       AR = [A1, ..., Ap];

 INPUT:
  Y	 Multivariate data series 
  p     Model order
  Mode	 determines estimation algorithm 

 OUTPUT:
  AR    multivariate autoregressive model parameter
  RC    reflection coefficients (= -PARCOR coefficients)
  PE    remaining error variances for increasing model order
	   PE(:,p*M+[1:M]) is the residual variance for model order p

 All input and output parameters are organized in columns, one column 
 corresponds to the parameters of one channel.

 Mode determines estimation algorithm. 
  1:  Correlation Function Estimation method using biased correlation function estimation method
   		also called the 'multichannel Yule-Walker' [1,2] 
  6:  Correlation Function Estimation method using unbiased correlation function estimation method

  2:  Partial Correlation Estimation: Vieira-Morf [2] using unbiased covariance estimates.
               In [1] this mode was used and (incorrectly) denominated as Nutall-Strand. 
		Its the DEFAULT mode; according to [1] it provides the most accurate estimates.
  5:  Partial Correlation Estimation: Vieira-Morf [2] using biased covariance estimates.
		Yields similar results than Mode=2;

  3:  buggy: Partial Correlation Estimation: Nutall-Strand [2] (biased correlation function)
  9:  Partial Correlation Estimation: Nutall-Strand [2] (biased correlation function)
  7:  Partial Correlation Estimation: Nutall-Strand [2] (unbiased correlation function)
  8:  Least Squares w/o nans in Y(t):Y(t-p)
 10:  ARFIT [3] 
 11:  BURGV [4] 
 13:  modified BURGV -  
 14:  modified BURGV [4] 
 15:  Least Squares based on correlation matrix
 22: Modified Partial Correlation Estimation: Vieira-Morf [2,5] using unbiased covariance estimates.
 25: Modified Partial Correlation Estimation: Vieira-Morf [2,5] using biased covariance estimates.

 90,91,96: Experimental versions 

    Imputation methods:
  100+Mode: 
  200+Mode: forward, past missing values are assumed zero
  300+Mode: backward, past missing values are assumed zero
  400+Mode: forward+backward, past missing values are assumed zero
 1200+Mode: forward, past missing values are replaced with predicted value
 1300+Mode: backward, 'past' missing values are replaced with predicted value
 1400+Mode: forward+backward, 'past' missing values are replaced with predicted value
 2200+Mode: forward, past missing values are replaced with predicted value + noise to prevent decaying
 2300+Mode: backward, past missing values are replaced with predicted value + noise to prevent decaying
 2400+Mode: forward+backward, past missing values are replaced with predicted value + noise to prevent decaying






# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
 MVAR estimates parameters of the Multi-Variate AutoRegressive model 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
mvfilter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1028
 Multi-variate filter function

 Y = MVFILTER(B,A,X)
 [Y,Z] = MVFILTER(B,A,X,Z)

  Y = MVFILTER(B,A,X) filters the data in matrix X with the
    filter described by cell arrays A and B to create the filtered
    data Y.  The filter is a 'Direct Form II Transposed'
    implementation of the standard difference equation:
 
    a0*Y(n) = b0*X(:,n) + b1*X(:,n-1) + ... + bq*X(:,n-q)
                        - a1*Y(:,n-1) - ... - ap*Y(:,n-p)

  A=[a0,a1,a2,...,ap] and B=[b0,b1,b2,...,bq] must be matrices of
  size  Mx((p+1)*M) and Mx((q+1)*M), respectively. 
  a0,a1,...,ap, b0,b1,...,bq are matrices of size MxM
  a0 is usually the identity matrix I or must be invertible 
  X should be of size MxN, if X has size NxM a warning 
  is raised, and the output Y is also transposed. 

 A simulated MV-AR process can be generiated with 
	Y = mvfilter(eye(M), [eye(M),-AR],randn(M,N));

 A multivariate inverse filter can be realized with 
       [AR,RC,PE] = mvar(Y,P);
	E = mvfilter([eye(M),-AR],eye(M),Y);

 see also: MVAR, FILTER



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
 Multi-variate filter function



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
mvfreqz


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4475
 MVFREQZ multivariate frequency response
 [S,h,PDC,COH,DTF,DC,pCOH,dDTF,ffDTF,pCOH2,PDCF,coh,GGC,Af,GPDC,GGC2,DCOH] = mvfreqz(B,A,C,f,Fs)
 [...]  = mvfreqz(B,A,C,N,Fs)
  
 INPUT: 
 ======= 
 A, B	multivariate polynomials defining the transfer function

    a0*Y(n) = b0*X(n) + b1*X(n-1) + ... + bq*X(n-q)
                          - a1*Y(n-1) - ... - ap*Y(:,n-p)

  A=[a0,a1,a2,...,ap] and B=[b0,b1,b2,...,bq] must be matrices of
  size  Mx((p+1)*M) and Mx((q+1)*M), respectively. 

  C is the covariance of the input noise X (i.e. D'*D if D is the mixing matrix)
  N if scalar, N is the number of frequencies 
    if N is a vector, N are the designated frequencies. 
  Fs sampling rate [default 2*pi]
 
  A,B,C and D can by obtained from a multivariate time series 
       through the following commands: 
  [AR,RC,PE] = mvar(Y,P);
       M = size(AR,1); % number of channels       
       A = [eye(M),-AR];
       B = eye(M); 
       C = PE(:,M*P+1:M*(P+1)); 

 Fs 	sampling rate in [Hz]
 (N 	number of frequencies for computing the spectrum, this will become OBSOLETE),  
 f	vector of frequencies (in [Hz])  


 OUTPUT: 
 ======= 
 S   	power spectrum
 h	transfer functions, abs(h.^2) is the non-normalized DTF [11]
 PDC 	partial directed coherence [2]
 DC  	directed coupling [13] 	
 COH 	coherency (complex coherence) [5]
 DTF 	directed transfer function [3,13]
 pCOH 	partial coherence 
 dDTF 	direct Directed Transfer function
 ffDTF full frequency Directed Transfer Function 
 pCOH2 partial coherence - alternative method 
 GGC	a modified version of Geweke's Granger Causality [Geweke 1982]
	   !!! it uses a Multivariate AR model, and computes the bivariate GGC as in [Bressler et al 2007]. 
	   This is not the same as using bivariate AR models and GGC as in [Bressler et al 2007]
 Af	Frequency transform of A(z), abs(Af.^2) is the non-normalized PDC [11]
 PDCF 	Partial Directed Coherence Factor [2]
 GPDC 	Generalized Partial Directed Coherence [9,10]
 DCOH  directed coherence or Generalized DTF (GDTF) [12] (equ. 11a)

 see also: FREQZ, MVFILTER, MVAR
 
 REFERENCE(S):
 [1] H. Liang et al. Neurocomputing, 32-33, pp.891-896, 2000. 
 [2] L.A. Baccala and K. Samashima, Biol. Cybern. 84,463-474, 2001. 
 [3] A. Korzeniewska, et al. Journal of Neuroscience Methods, 125, 195-207, 2003. 
 [4] Piotr J. Franaszczuk, Ph.D. and Gregory K. Bergey, M.D.
 	Fast Algorithm for Computation of Partial Coherences From Vector Autoregressive Model Coefficients
	World Congress 2000, Chicago. 
 [5] Nolte G, Bai O, Wheaton L, Mari Z, Vorbach S, Hallett M.
	Identifying true brain interaction from EEG data using the imaginary part of coherency.
	Clin Neurophysiol. 2004 Oct;115(10):2292-307. 
 [6] Schlogl A., Supp G.
       Analyzing event-related EEG data with multivariate autoregressive parameters.
       (Eds.) C. Neuper and W. Klimesch, 
       Progress in Brain Research: Event-related Dynamics of Brain Oscillations. 
       Analysis of dynamics of brain oscillations: methodological advances. Elsevier. 
       Progress in Brain Research 159, 2006, p. 135 - 147
 [7] Bressler S.L., Richter C.G., Chen Y., Ding M. (2007)
	Cortical fuctional network organization from autoregressive modelling of loal field potential oscillations.
	Statistics in Medicine, doi: 10.1002/sim.2935 
 [8] Geweke J., 1982	
	J.Am.Stat.Assoc., 77, 304-313.
 [9] L.A. Baccala, D.Y. Takahashi, K. Sameshima. (2006) 
 	Generalized Partial Directed Coherence. 
	Submitted to XVI Congresso Brasileiro de Automatica, Salvador, Bahia.  
 [10] L.A. Baccala, D.Y. Takahashi, K. Sameshima. 
 	Computer Intensive Testing for the Influence Between Time Series, 
	Eds. B. Schelter, M. Winterhalder, J. Timmer: 
	Handbook of Time Series Analysis - Recent Theoretical Developments and Applications
	Wiley, p.413, 2006.
 [11] M. Eichler
	On the evaluation of informatino flow in multivariate systems by the directed transfer function
	Biol. Cybern. 94: 469-482, 2006. 	
 [12] L. Faes, S. Erla, and G. Nollo, (2012)
	Measuring Connectivity in Linear Multivariate Processes: Definitions, Interpretation, and Practical Analysis
	Computational and Mathematical Methods in Medicine Volume 2012 (2012), Article ID 140513, 18 pages
	doi:10.1155/2012/140513
 [13] Maciej Kaminski, Mingzhou Ding, Wilson A. Truccolo, Steven L. Bressler
	Evaluating causal relations in neural systems: Granger causality, 
       directed transfer function and statistical assessment of significance.
 	Biol. Cybern. 85, 145-157 (2001)




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 MVFREQZ multivariate frequency response
 [S,h,PDC,COH,DTF,DC,pCOH,dDTF,ffDTF,pC



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
pacf


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 137
 Partial Autocorrelation function
 [parcor,sig,cil,ciu] = pacf(Z,N);

 Input:
	Z    Signal, each row is analysed
	N    # of coefficients



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
 Partial Autocorrelation function
 [parcor,sig,cil,ciu] = pacf(Z,N);



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
parcor


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1160
 estimates partial autocorrelation coefficients 
 Multiple channels can be used (one per row).

 [PARCOR, AR, PE] = parcor(AutoCov); % calculates Partial autocorrelation, autoregressive coefficients and residual error variance from the Autocorrelation function. 

 [PARCOR] = parcor(acovf(x,p)); % calculates the Partial Autocorrelation coefficients of the data series x up to order p

  INPUT:
 AutoCov	Autocorrelation function for lag=0:P

  OUTPUT
 AR	autoregressive model parameter	
 PARCOR partial correlation coefficients (= -reflection coefficients)
 PE    remaining error variance

 All input and output parameters are organized in rows, one row 
 corresponds to the parameters of one channel. 
 The PARCOR coefficients are the negative reflection coefficients. 
 A significance test is implemented in PACF.

 see also: PACF ACOVF ACORF DURLEV AC2RC 
 
 REFERENCES:
  P.J. Brockwell and R.A. Davis "Time Series: Theory and Methods", 2nd ed. Springer, 1991.
  S. Haykin "Adaptive Filter Theory" 3ed. Prentice Hall, 1996.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 estimates partial autocorrelation coefficients 
 Multiple channels can be used 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
poly2ac


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 183
 converts an AR polynomial into an autocorrelation sequence
 [R] = poly2ac(a [,efinal] );

 see also ACOVF ACORF AR2RC RC2AR DURLEV AC2POLY, POLY2RC, RC2POLY, RC2AC, AC2RC, POLY2AC
 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 converts an AR polynomial into an autocorrelation sequence
 [R] = poly2ac(a [,e



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
poly2ar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 288
 Converts AR polymials into autoregressive parameters. 
 Multiple polynomials can be converted. 

 function  [AR] = poly2ar(A);

  INPUT:
 A     AR polynomial, each row represents one polynomial

  OUTPUT
 AR    autoregressive model parameter	

 see also ACOVF ACORF DURLEV RC2AR AR2POLY



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
 Converts AR polymials into autoregressive parameters.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
poly2rc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 434
 converts AR-polynomial into reflection coefficients
 [RC,R0] = poly2rc(A [,Efinal])

  INPUT:
 A     AR polynomial, each row represents one polynomial
 Efinal    is the final prediction error variance (default value 1)

  OUTPUT
 RC    reflection coefficients
 R0    is the variance (autocovariance at lag=0) based on the 
	prediction error


 see also ACOVF ACORF AR2RC RC2AR DURLEV AC2POLY, POLY2RC, RC2POLY, RC2AC, AC2RC, POLY2AC



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 converts AR-polynomial into reflection coefficients
 [RC,R0] = poly2rc(A [,Efin



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
rc2ac


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 176
 converts reflection coefficients to autocorrelation sequence
 [R] = rc2ac(RC,R0);

 see also ACOVF ACORF AR2RC RC2AR DURLEV AC2POLY, POLY2RC, RC2POLY, RC2AC, AC2RC, POLY2AC
 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 converts reflection coefficients to autocorrelation sequence
 [R] = rc2ac(RC,R0



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
rc2ar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1000
 converts reflection coefficients into autoregressive parameters
 uses the Durbin-Levinson recursion for multiple channels
 function  [AR,RC,PE,ACF] = rc2ar(RC);
 function  [MX,PE] = rc2ar(RC);

  INPUT:
 RC    reflection coefficients

  OUTPUT
 AR    autoregressive model parameter	
 RC    reflection coefficients (= -PARCOR coefficients)
 PE    remaining error variance (relative to PE(1)=1)
 MX    transformation matrix between ARP and RC (Attention: needs O(p^2) memory)
        arp=MX(:,K*(K-1)/2+(1:K));
        rc =MX(:,(1:K).*(2:K+1)/2);

 All input and output parameters are organized in rows, one row 
 corresponds to the parameters of one channel

 see also ACOVF ACORF DURLEV AR2RC 
 
 REFERENCES:
  P.J. Brockwell and R. A. Davis "Time Series: Theory and Methods", 2nd ed. Springer, 1991.
  S. Haykin "Adaptive Filter Theory" 3rd ed. Prentice Hall, 1996.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 converts reflection coefficients into autoregressive parameters
 uses the Durbi



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
rc2poly


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 174
 converts reflection coefficients into an AR-polynomial
 [a,efinal] = rc2poly(K)

 see also ACOVF ACORF AR2RC RC2AR DURLEV AC2POLY, POLY2RC, RC2POLY, RC2AC, AC2RC, POLY2AC
 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 converts reflection coefficients into an AR-polynomial
 [a,efinal] = rc2poly(K)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
rmle


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 432
 RMLE estimates AR Parameters using the Recursive Maximum Likelihood 
 Estimator according to [1]
 
 Use: [a,VAR]=rmle(x,p)
 Input: 
 x is a column vector of data
 p is the model order
 Output:
 a is a vector with the AR parameters of the recursive MLE
 VAR is the excitation white noise variance estimate

 Reference(s):
 [1] Kay S.M., Modern Spectral Analysis - Theory and Applications. 
       Prentice Hall, p. 232-233, 1988. 




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 RMLE estimates AR Parameters using the Recursive Maximum Likelihood 
 Estimator



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
sbispec


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
 SBISPEC show BISPECTRUM 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
 SBISPEC show BISPECTRUM 




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
selmo


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2179
 Model order selection of an autoregrssive model
 [FPE,AIC,BIC,SBC,MDL,CAT,PHI,optFPE,optAIC,optBIC,optSBC,optMDL,optCAT,optPHI]=selmo(E,N);

 E	Error function E(p)
 N	length of the data set, that was used for calculating E(p)
 show  optional; if given the parameters are shown

 FPE	Final Prediction Error (Kay 1987, Wei 1990, Priestley 1981  -> Akaike 1969)
 AIC	Akaike Information Criterion (Marple 1987, Wei 1990, Priestley 1981 -> Akaike 1974)
 BIC	Bayesian Akaike Information Criterion (Wei 1990, Priestley 1981 -> Akaike 1978,1979)
 CAT	Parzen's CAT Criterion (Wei 1994 -> Parzen 1974)
 MDL	Minimal Description length Criterion (Marple 1987 -> Rissanen 1978,83)
 SBC	Schwartz's Bayesian Criterion (Wei 1994; Schwartz 1978)
 PHI	Phi criterion (Pukkila et al. 1988, Hannan 1980 -> Hannan & Quinn, 1979)
 HAR	Haring G. (1975)
 JEW	Jenkins and Watts (1968)

 optFPE 	order where FPE is minimal
 optAIC 	order where AIC is minimal
 optBIC 	order where BIC is minimal
 optSBC 	order where SBC is minimal
 optMDL 	order where MDL is minimal
 optCAT 	order where CAT is minimal
 optPHI 	order where PHI is minimal

 usually is 
 AIC > FPE > *MDL* > PHI > SBC > CAT ~ BIC

 REFERENCES:
  P.J. Brockwell and R.A. Davis "Time Series: Theory and Methods", 2nd ed. Springer, 1991.
  S. Haykin "Adaptive Filter Theory" 3ed. Prentice Hall, 1996.
  M.B. Priestley "Spectral Analysis and Time Series" Academic Press, 1981. 
  C.E. Shannon and W. Weaver "The mathematical theory of communication" University of Illinois Press, Urbana 1949 (reprint 1963).
  W.S. Wei "Time Series Analysis" Addison Wesley, 1990.
  Jenkins G.M. Watts D.G "Spectral Analysis and its applications", Holden-Day, 1968.
  G. Haring  "Über die Wahl der optimalen Modellordnung bei der Darstellung von stationären Zeitreihen mittels Autoregressivmodell als Basis der Analyse von EEG - Biosignalen mit Hilfe eines Digitalrechners", Habilitationschrift - Technische Universität Graz, Austria, 1975.
                  (1)"About selecting the optimal model at the representation of stationary time series by means of an autoregressive model as basis of the analysis of EEG - biosignals by means of a digital computer)"




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 Model order selection of an autoregrssive model
 [FPE,AIC,BIC,SBC,MDL,CAT,PHI,o



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
selmo2


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 271
 SELMO2 - model order selection for univariate and multivariate 
   autoregressive models 
 
  X = selmo(y,Pmax); 
  
  y 	data series
  Pmax maximum model order 
  X.A, X.B, X.C parameters of AR model 
  X.OPT... various optimization criteria
 
 see also: SELMO, MVAR, 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 SELMO2 - model order selection for univariate and multivariate 
   autoregressi



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
sinvest1


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 93
SINVEST1 shows the parameters of a time series calculated by INVEST1
 only called by INVEST1



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
SINVEST1 shows the parameters of a time series calculated by INVEST1
 only calle



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
sumskipnan


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1234
 SUMSKIPNAN adds all non-NaN values. 

 All NaN's are skipped; NaN's are considered as missing values. 
 SUMSKIPNAN of NaN's only  gives O; and the number of valid elements is return. 
 SUMSKIPNAN is also the elementary function for calculating 
 various statistics (e.g. MEAN, STD, VAR, RMS, MEANSQ, SKEWNESS, 
 KURTOSIS, MOMENT, STATISTIC etc.) from data with missing values.  
 SUMSKIPNAN implements the DIMENSION-argument for data with missing values.
 Also the second output argument return the number of valid elements (not NaNs) 
 
 Y = sumskipnan(x [,DIM])
 [Y,N,SSQ] = sumskipnan(x [,DIM])
 [...] = sumskipnan(x, DIM, W)
 
 x	input data 	
 DIM	dimension (default: [])
	empty DIM sets DIM to first non singleton dimension	
 W	weight vector for weighted sum, numel(W) must fit size(x,DIM)
 Y	resulting sum
 N	number of valid (not missing) elements
 SSQ	sum of squares

 the function FLAG_NANS_OCCURED() returns whether any value in x
  is a not-a-number (NaN)

 features:
 - can deal with NaN's (missing values)
 - implements dimension argument. 
 - computes weighted sum 
 - compatible with Matlab and Octave

 see also: FLAG_NANS_OCCURED, SUM, NANSUM, MEAN, STD, VAR, RMS, MEANSQ, 
      SSQ, MOMENT, SKEWNESS, KURTOSIS, SEM



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
 SUMSKIPNAN adds all non-NaN values.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
tsademo


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
 TSADEMO	demonstrates INVEST1 on EEG data



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
 TSADEMO	demonstrates INVEST1 on EEG data




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
ucp


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 476
 UCP(C) tests if the polynomial C is a Unit-Circle-Polynomial.
	It tests if all roots lie inside the unit circle like
       B=ucp(C) does the same as
	B=all(abs(roots(C))<1) but much faster.
	The Algorithm is based on the Jury-Scheme.
	C are the elements of the Polynomial
	C(1)*X^N + ... + C(N)*X + C(N+1).
 
 REFERENCES:
  O. Foellinger "Lineare Abtastsysteme", Oldenburg Verlag, Muenchen, 1986.
  F. Gausch "Systemtechnik", Textbook, University of Technology Graz, 1993. 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
 UCP(C) tests if the polynomial C is a Unit-Circle-Polynomial.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
y2res


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 534
 Y2RES evaluates basic statistics of a data series
 
 R = y2res(y)
	several statistics are estimated from each column of y
 
 OUTPUT:
   R.N     number of samples, NaNs are not counted 
   R.SUM   sum of samples
   R.MEAN  mean
   R.STD   standard deviation 
   R.VAR   variance
   R.Max   Maximum
   R.Min   Minimum 
   ...   and many more including:  
	MEDIAN, Quartiles, Variance, standard error of the mean (SEM), 
	Coefficient of Variation, Quantization (QUANT), TRIMEAN, SKEWNESS, 
	KURTOSIS, Root-Mean-Square (RMS), ENTROPY 
 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 Y2RES evaluates basic statistics of a data series
 
 R = y2res(y)
	several stat