Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I am coding a Kalman filter in R and I am trying to estimate the parameters dV and dW using the methods as provided in Vignette section2. However I get Epsilon=0 (which is dV for Kalman filter) for my ts data. I am not sure how we get a non-zero dV for the Nile data (available in R) used in the example in 1. Can somebody explain what dV means as it is not the same as var(z)?

> dput(z)   # my time series data
structure(c(4341, 3426, 2312, 2118, 2003, 1881, 1734, 1764, 1634, 
1649, 1316, 1191, 1145, 1094, 1118, 1107, 1145, 1087, 1071, 1056, 
1075, 984, 925, 963, 916, 873, 836, 837, 903, 924, 847, 863, 
874, 872, 926, 1017, 1274, 1306, 1334, 1240, 1971, 2620, 2803, 
2701, 2846, 2728, 2597, 2440, 2673, 2588, 2578, 2899, 3129, 3100, 
4244, 5175, 6409, 7444, 7732, 5847, 4483, 3350, 2907, 2626, 2162, 
2151, 1628, 1575, 1353, 1443, 1150, 1161, 1122, 1147, 1173, 1026, 
966, 925, 980, 1002, 939, 1010, 958, 1141, 1138, 1112, 1029, 
1369, 1878, 1478, 1694, 2065, 2635, 2438, 2539, 3099, 3014, 2825, 
2610, 2972, 2911, 3508, 4579, 5421, 4382, 3997, 3927, 4116, 4122, 
3696, 3793, 3607, 3386, 2817, 2293, 2101, 2111, 1933, 1769, 1694, 
1711, 1560, 1428, 1322, 1286, 1346, 1174, 1006, 1031, 997, 1066, 
1071, 1015, 1064, 1004, 1003, 992, 1095, 1161, 1252, 1416, 1495, 
1649, 1918, 1913, 1959, 2341, 2609, 2952, 2918, 2684, 2836, 2873, 
3205, 3078, 3510, 3524, 3126, 2685, 3213, 4183, 5710, 5925, 6565, 
5543, 4649, 3324, 2673, 2156, 1899, 2175, 1892, 1693, 1539, 1411, 
1381, 1339, 1385, 1359, 1336, 1310, 1178, 1204, 1186, 1224, 1200, 
1209, 1308, 1212, 1172, 1323, 1495, 1580, 1758, 1743, 2019, 2267, 
2363, 2522, 2680, 2889, 2894, 2386, 2934, 2908, 2615, 2434, 3022, 
4408, 4546, 4965, 7135, 9531, 9758, 8440, 7945, 6356, 4819, 4100, 
3085, 2694, 2202, 2023, 1828, 1812, 1518, 1404, 1427, 1361, 1221, 
1174, 1070, 1059, 969, 982, 1059, 1009, 1011, 999, 969, 1042, 
1004, 1133, 1249, 1380, 1519, 1746, 1907, 2053, 2173, 2412, 2764, 
2742, 2990, 3085, 2576, 3108, 2990, 2972, 3360, 3625, 3257, 3375, 
4520, 5707, 8206, 7994, 6058, 5132, 4153, 3054, 2427, 2212, 2050, 
1655, 1755, 2048, 4878, 3341, 2561, 2464, 2158, 1881, 1843, 1864, 
1970, 1799, 1515, 1473, 1793, 1878, 1919, 1854, 1977, 2500, 3608, 
5708, 8518, 10915, 13458, 12567, 10789, 8682, 6933, 6048, 4972, 
4132, 3323, 3362, 3145, 2976, 3181), .Tsp = c(2004, 2009.98076923077, 
52), class = "ts")

> StructTS(z,"level") 

Call:
StructTS(x = z, type = "level")

Variances:
  level  epsilon  
 403733        0  

>data(Nile)
>StructTS(Nile,"level")

Call:
StructTS(x = Nile, type = "level")

Variances:
  level  epsilon  
   1469    15099  
share|improve this question

1 Answer

dV is the variance of the observation error. It is not uncommon to find dV=0; see for example in the help for command StructTS the following comment:

 Optimization of structural models is a lot harder than many of the
 references admit. For example, the 'AirPassengers' data are
 considered in Brockwell & Davis (1996): their solution appears to
 be a local maximum, but nowhere near as good a fit as that
 produced by 'StructTS'.  It is quite common to find fits with one
 or more variances zero, and this can include sigma^2_eps.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.