how do i import along with the variables (for example v1 to v121) lables that i have made in excel or a csv file.
an example of it would be v1 has a label of gdp and v2 has a label of cpi
(i dont want to write manually 121 labels)
i am using v1-v121 because they will be used later in programs that i am writing and i want the grapical repsentation to have the labels of the variables and not v1-v121.
thanks
yoniboi
Importing lables from ascii or excel files
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Importing lables from ascii or excel files
Assuming you have the name in the first row, and the label in the second row, when you open the Excel file in EViews, on the second page of the Excel read dialog there is a section that lets you specify the header rows. Change this so that is says there are two rows of headers, and the name is in the first row. EViews will then read the second row as a description.
Follow us on Twitter @IHSEViews
Re: Importing lables from ascii or excel files
Thank you for the quick response, but what i need is for the second feild to go into the label not the description, so when i make graphs and such the label will show up and not the generic variable name i give it.
thank you
yoniboi
thank you
yoniboi
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Importing lables from ascii or excel files
I think you're confusing "display name" and "label", but I understand what you mean. There is no way to import the description as a display name.
If you're using EViews 7, you can do something along the lines of:
where X is the name of a series. Obviously if you have lots of series, you could write a for loop to loop through them all doing the same thing.
If you're using EViews 7, you can do something along the lines of:
Code: Select all
%s = x.@description
x.displayname {%s}
where X is the name of a series. Obviously if you have lots of series, you could write a for loop to loop through them all doing the same thing.
Follow us on Twitter @IHSEViews
Re: Importing lables from ascii or excel files
I cannot use the same code for Eviews 6 or a variation of it?
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Importing lables from ascii or excel files
Code: Select all
freeze(t) x.label
%s = t(6,2)
d t
w1.displayname {%s}
Follow us on Twitter @IHSEViews
Re: Importing lables from ascii or excel files
that code worked great thanks
Who is online
Users browsing this forum: No registered users and 23 guests