[R] Handling nonexistent observations in R for time series analysis and forecasting

Paul Bernal paulbernal07 at gmail.com
Mon Mar 27 16:15:12 CEST 2017

Dear friends,

Hope you are all doing great. I am trying to model historical data on
transits, and the dates are in the following format: 1985-10-01
00:00:00.000 (this would be october, 1985).
The data comes from an SQL Server Database and there are several missing
observations. The problem is that, for example, there are dates for which
no transit was recorded (because no transit took place) and instead of
having that date recorded with an NA value, that date does not appear,
resulting in a sequence like this:
1985-01-01 00:00:00.000, 1985-02-01 00:00:00.000, 1985-05-01 00:00:00.00
in this example you start in january 1985, the february 1985, then the next
available observation is on may 1985.
I know R´s tsclean(data) function takes care of missing values, but that
only works if you at least have the non available dates recorded with a
value of NA, but what if I do not have those missing observations?

Any help will be greatly appreciated,

Best regards,


	[[alternative HTML version deleted]]

More information about the R-help mailing list