Exercise

What does the time index tell us?

Some data are naturally evenly spaced by time. The time series discrete_data shown in the top figure has 20 observations, with one observation appearing at each of the discrete time indices 1 through 20. Discrete time indexing is appropriate for discrete_data.

The time series continuous_series shown in the bottom figure also has 20 observations, it is following the same periodic pattern as discrete_data, but its observations are not evenly spaced. Its first, second, and last observations were observed at times 1.210322, 1.746137, and 20.180524, respectively. Continuous time indexing is natural for continuous_series, however, the observations are approximately evenly spaced, with about 1 observation observed per time unit. Let's investigate using a discrete time indexing for continuous_series.

Instructions

100 XP
  • Use plot(___, ___, type = "b") to display continuous_series versus continuous_time_index, its continuous time index
  • Create a vector 1:20 to be used as a discrete time index.
  • Now use plot(___, ___, type = "b") to display continuous_series versus discrete_time_index
  • Note the various differences between the resulting figures, but the approximation appears reasonable because the overall trend remained preserved