Page 1 of 1
Any way to generate missing time periods in data?
Posted: Wed May 27, 2015 3:01 pm
by JanVinter
I have a large, monthly dataset that ranges from Jan 2010 to Dec 2014. There is an entry for almost every month; however, some months are missing from that range (for example, August 2010 and March 2012) because there were no sales in that time period by any of the companies in the dataset. Is there a way to get EViews to recognize this fact and get it to automatically generate those months and populate it with 0s or NAs?
Thanks
Re: Any way to generate missing time periods in data?
Posted: Wed May 27, 2015 3:13 pm
by EViews Gareth
Can you be more specific? If there is no data for those months, then they should already be NA.
Re: Any way to generate missing time periods in data?
Posted: Wed May 27, 2015 3:20 pm
by JanVinter
The data is in a format like below:
Month Total Sales
Jan 2011 $100
Feb 2011 $110
Mar 2011 $90
May 2011 $120
Jun 2011 $85
(cont'd)
In the above example, there were no sales in the month of April 2011, so that row doesn't exist at all in the Excel file through which the data is being imported to EViews. So I was wondering if it would be possible for EViews to automatically generate a row for April and fill it with NA.
Re: Any way to generate missing time periods in data?
Posted: Wed May 27, 2015 3:29 pm
by EViews Gareth
From the workfile Proc->Structure/Resize Current Page, then select "insert empty obs to remove gaps".
Re: Any way to generate missing time periods in data?
Posted: Wed May 27, 2015 3:33 pm
by JanVinter
Perfect. Thank you Gareth. This is precisely what I was looking for.