I have a file imptest.txt which looks like:
testimport
NA
1
2
3
4
NA
5
6
7
Then in EViews I enter:
import(type=text,resize) imptest.txt @freq monthly 1960m1
This creates a variable testimportna!
What am I doing wrong?
Tim
import with NA as first obs
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13611
- Joined: Tue Sep 16, 2008 5:38 pm
Re: import with NA as first obs
try:
Code: Select all
import(type=text,resize) imptest.txt colhead=1 @freq monthly 1960m1
Re: import with NA as first obs
Thanks Gareth! Works great!
Tim
Tim
Re: import with NA as first obs
Hi Gareth,
The import command has worked great for most cases, but now I have a problem I can't figure out.
My data is only one observation and some of the values may be NA's.
gdp rff rtb rg10e
5 4 NA 3
The import command will make gdp, rff and rg10e numeric series and rtb will be a alpha series.
I want rtb to be a numeric series with the missing value, NA, as its only observation.
The import command I use: import(type=text,resize,mode=u) smallfile.txt colhead=1 @freq 4 2010q1
This type of command has worked for every other case I've tried to import.
Tim
The import command has worked great for most cases, but now I have a problem I can't figure out.
My data is only one observation and some of the values may be NA's.
gdp rff rtb rg10e
5 4 NA 3
The import command will make gdp, rff and rg10e numeric series and rtb will be a alpha series.
I want rtb to be a numeric series with the missing value, NA, as its only observation.
The import command I use: import(type=text,resize,mode=u) smallfile.txt colhead=1 @freq 4 2010q1
This type of command has worked for every other case I've tried to import.
Tim
Re: import with NA as first obs
OK, I think I figured it out.
On the import command I need to add a "format=<n>F" where <n> is the number of series I am reading. That forces the import to read all the values as numeric series as opposed to alpha series.
Is there a way to use a meta character like "*" to say format=(*F) and have all values series read in as numeric?
An observation: The documentation for format is way over in the wfopen documentation. I had no idea the format option was available for the import command. Some better cross referencing would be nice.
Tim
On the import command I need to add a "format=<n>F" where <n> is the number of series I am reading. That forces the import to read all the values as numeric series as opposed to alpha series.
Is there a way to use a meta character like "*" to say format=(*F) and have all values series read in as numeric?
An observation: The documentation for format is way over in the wfopen documentation. I had no idea the format option was available for the import command. Some better cross referencing would be nice.
Tim
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13611
- Joined: Tue Sep 16, 2008 5:38 pm
Re: import with NA as first obs
There is no way to specify all series.
I tend to agree on the documentation issue. Although wfopen, open, import, pageload, and to some extent, wfsave, save, pagesave all have almost identical options, and it was felt somewhat excessive to repeat those options in multiple pages, hence the the references to wfopen.
I tend to agree on the documentation issue. Although wfopen, open, import, pageload, and to some extent, wfsave, save, pagesave all have almost identical options, and it was felt somewhat excessive to repeat those options in multiple pages, hence the the references to wfopen.
Who is online
Users browsing this forum: No registered users and 2 guests
