Any way to generate missing time periods in data?

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

JanVinter
Posts: 10
Joined: Thu Apr 30, 2015 9:49 am

Any way to generate missing time periods in data?

Postby JanVinter » Wed May 27, 2015 3:01 pm

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13583
Joined: Tue Sep 16, 2008 5:38 pm

Re: Any way to generate missing time periods in data?

Postby EViews Gareth » Wed May 27, 2015 3:13 pm

Can you be more specific? If there is no data for those months, then they should already be NA.

JanVinter
Posts: 10
Joined: Thu Apr 30, 2015 9:49 am

Re: Any way to generate missing time periods in data?

Postby JanVinter » Wed May 27, 2015 3:20 pm

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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13583
Joined: Tue Sep 16, 2008 5:38 pm

Re: Any way to generate missing time periods in data?

Postby EViews Gareth » Wed May 27, 2015 3:29 pm

From the workfile Proc->Structure/Resize Current Page, then select "insert empty obs to remove gaps".

JanVinter
Posts: 10
Joined: Thu Apr 30, 2015 9:49 am

Re: Any way to generate missing time periods in data?

Postby JanVinter » Wed May 27, 2015 3:33 pm

Perfect. Thank you Gareth. This is precisely what I was looking for.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest