[R] Modeling Time Series with Missing Observations

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Thu Mar 23 16:42:52 CET 2017


Even the most basic introduction to R discusses the use of NA for missing data. Injecting values that could be mistaken for actual readings is a dangerous approach. You can use the merge function to introduce missing rows into zoo objects or data frames. 
-- 
Sent from my phone. Please excuse my brevity.

On March 23, 2017 8:22:47 AM PDT, Paul Bernal <paulbernal07 at gmail.com> wrote:
>Dear all,
>
>Hope you are doing well. I am trying to model the historical number of
>transits of a particular market segment, but the problem is that I have
>missing data.
>
>I am working with monthly data, so I have 12 observations per year (in
>general). The problem is that, when I bring the data from the database,
>the
>following happens, for example:
>
>January-2000, Feb-2000, Apr-2000, Jun 2000 (I have missing
>observations)
>
>when I am supposed to have the sequence January-2000, Feb-2000,
>Mar-2000,
>Apr-2000, May-2000, Jun-2000, etc.
>
>How can I model a time series when there are missing months? I was
>planning
>making up fictional or fake observations with a value of 1 to fill in
>the
>gaps but not sure if this is a reasonable approach.
>
>Any help and/or guidance will be greatly appreciated,
>
>Best regards,
>
>Paul
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list