I am trying to use R to build a time-series model to predict a variable which is only reported on irregular intervals. I have data for independent variables for all time periods (days), however the key dependent variable, reported_UV, is only reported monthly (every 30 or so days).

I am looking for help building this model so that reported_UV can be predicted based upon previous cases of reported_UV as well as the independent variables.

The dataset is at the following link in .csv format: https://docs.google.com/file/d/0B42_3jCtgxwYRVp5dkJ2NGVnaWs/edit?usp=sharing

A description of the data fields is as follows:

  • Month_Year The Month & Year (e.g. Jun-11)
  • Date The Date (e.g. 6/1/2011)
  • DayInMonth The day in month (e.g. for June 1st, this would be "1")
  • Weekday Shows as "1" if the day is a weekday
  • Weekend Shows as "1" if the day is a weekend
  • Holiday Shows as "1" if the day is a holiday
  • Month Shows the month in the year (e.g. for June, this would be "6")
  • daily_UV The total unique visitors for the day
  • p28_UV A lagging indicator showing the total unique visitors for past 28 days. This is a deduped version of the previous 28 days of daily_UV.
  • reported_UV This is the key dependent variable to predict, reported by an independent auditor. This is reported on the last day of the month and shows the total unique visitors for the month. For example, the value on June 30th shows the entire month of June. All other values are missing.

migrated from stackoverflow.com Jul 18 '13 at 15:12

This question came from our site for professional and enthusiast programmers.

  • $\begingroup$ What are the differences/link between daily_UV and reported_UV? From your description, they sound like two measures of the same thing. Perhaps, something could be gained by modeling/predicting daily_UV and looking at it as a proxy for reported_UV? $\endgroup$ – Gala Jul 18 '13 at 15:28
  • $\begingroup$ Possibly a vector autoregressive model (VAR)? $\endgroup$ – wcampbell Jul 19 '13 at 1:20
  • $\begingroup$ reported_uv is what an independent agency is reporting for unique visitors per month, while daily_uv is what our servers show for unique visitors per day. An autoregressive model sounds like a good plan, however I'm unsure how to model this when the data is only reported for reported_uv every month. $\endgroup$ – joeygatorhands Jul 19 '13 at 2:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.