Page 1 of 1

Importing csv file - series coming trough as alphas

Posted: Mon May 22, 2017 10:53 pm
by macgibbonn
I am using Eviews 9.5 (32-bit version on an Enterprise licence)

I am importing a csv file (attached) of time series numeric data which contains occasional missing values as ".."

The simple import code I am using is:

Code: Select all

import M:\ExportDirect.csv colhead=1 @freq Q 1986q1
Four (4) of the 152 series are being imported as alphas rather than numeric. These series are:
  • HLFQ_SMB1JCA
    HLFQ_SMB2JBE
    HLFQ_SMB3JBF
    HLFQ_SMB3JCK
While these 4 series all have occasional instances of "..", there are other series which also have instances of ".." which are coming through as numeric.

Any suggestions as to how I can get the import to recognise the ".." as missing values?

I tried the following, but it did not work:

Code: Select all

import M:\ExportDirect.csv na=".." colhead=1 @freq Q 1986q1
Thanks in advance for any assistance

Re: Importing csv file - series coming trough as alphas

Posted: Tue May 23, 2017 7:44 am
by EViews Gareth
The problem is that you actually have two different values for NA - ".." and "" (i.e. blank). EViews only recognises one at a time, so interprets the second as a character.

You'll have to convert them to series afterwards using @val (or change the source csv to only have one type of NA).