User’s Guide : EViews Fundamentals : Object Basics : Working with Objects
  
Working with Objects
 
Naming Objects
Labeling Objects
Adding Custom Attributes in the Label View
Copying Objects
Copy-and-Pasting Objects
Freezing Objects
Deleting Objects
Printing Objects
Storing Objects
Fetching Objects
Updating Objects
Copy-and-Paste of Object Information
Naming Objects
Objects may be named or unnamed. When you give an object a name, the name will appear in the directory of the workfile, and the object will be saved as part of the workfile when the workfile is saved.
You must name an object if you wish to keep its results. If you do not name an object, it will be called “UNTITLED”. Unnamed objects are not saved with the workfile, so they are deleted when the workfile is closed and removed from memory.
To rename an object, first open the object window by double clicking on its icon, or by clicking on Show on the workfile toolbar, and entering the object name. Next, click on the Name button on the object window, and enter the name (up to 300 characters), and optionally, a display name to be used when labeling the object in tables and graphs. If no display name is provided, EViews will use the object name. Note: before EViews 10, the maximum object name length was 24 characters. You may not be able to correctly open a workfile with object names longer than 24 characters in previous versions of EViews.
You can also rename an object from the workfile window by selecting Object/Rename Selected… and then specifying the new object name. This method saves you from first having to open the object.
The following names are reserved and cannot be used as object names: “ABS”, “ACOS”, “AND”, “AR”, “ASIN”, “C”, “CON”, “CNORM”, “COEF”, “COS”, “D”, “DLOG”, “DNORM”, “ELSE”, “ENDIF”, “EXP”, “LOG”, “LOGIT”, “LPT1”, “LPT2”, “MA”, “NA”, “NOT”, “NRND”, “OR”, “PDL”, “RESID”, “RND”, “SAR”, “SIN”, “SMA”, “SQR”, and “THEN”.
EViews accepts both capital and lower case letters in the names you give to your series and other objects, but does not distinguish between names based on case. Its messages to you will follow normal capitalization rules. For example, “SALES”, “sales”, and “sAles” are all the same object in EViews. For the sake of uniformity, we have written all examples of input using names in lower case, but you should feel free to use capital letters instead.
Despite the fact that names are not case sensitive, when you enter text information in an object, such as a plot legend or label information, your capitalization will be preserved.
By default, EViews allows only one untitled object of a given type (one series, one equation, etc.). If you create a new untitled object of an existing type, you will be prompted to name the original object, and if you do not provide one, EViews will replace the original untitled object with the new object. The original object will not be saved. If you prefer, you can instruct EViews to retain all untitled objects during a session but you must still name the ones you want to save with the workfile. See “Window Behavior”.
Labeling Objects
In addition to the display name described above, EViews objects have label fields where you can provide extended annotation and commentary. To view these fields, select View/Label from the object window:
This is the label view of an unmodified object. By default, every time you modify the object, EViews automatically appends the modification in the Last Update field.
You can edit any of the fields, except Last Update. Simply click in the cell that you want to edit. All attributes contain only one line, except the Remarks field, which can contain multiple lines. Press ENTER after entering data into the current field to add a new line to this attribute.
These annotated fields are useful when you want to search for an object stored in an EViews database. Any text that is in the fields is searchable in an EViews database; see “Querying the Database” for further discussion.
Adding Custom Attributes in the Label View
EViews allows you to add any custom attribute that you’d like to your objects. Click in the empty cell below the last existing attribute, and before the Remarks label. You will see the text “Enter attribute name” in the edit field at the top of the window. Enter the name of your new custom attribute, and then move to the cell to the right to enter a value.
In our example, click below Units. Enter the name of the new attribute, and type the appropriate value in the field to the right. Here, we have created a custom attribute called Default Rate, and entered the value “6.23%”. Close the object window to accept the changes.
You must type something into the associated field on the right, or the custom attribute will not be saved when the object window is closed. To add an attribute whose data will be filled out in the future, you may want to enter “none” as a placeholder. However, adding custom attributes is easy, either via the label view as just described, or in the workfile window (see “Adding Your Own Label Attributes”), so this step should not be necessary.
Similarly, you can delete an attribute by removing its value. If we delete “6.23%” in our example and close the window, the Default Rate attribute will be removed from the object.
If you are adding custom attributes to many objects, EViews provides tools for doing so in the workfile window. See “Adding Your Own Label Attributes”. From the workfile Details view, you can add attributes across multiple objects, and populate them with values using workfile filtering techniques.
Copying Objects
There are two distinct methods of duplicating the information in an object: copying and freezing.
If you select Object/Copy from the menu, EViews will create a new untitled object containing an exact copy of the original object. By exact copy, we mean that the new object duplicates all the features of the original (except for the name). It contains all of the views and procedures of the original object and can be used in future analyses just like the original object.
You may also copy an object from the workfile window. Simply highlight the object and click on Object/Copy Selected… or right mouse click and select Object/Copy..., then specify the destination name for the object.
We mention here that Copy is a very general and powerful operation with many additional features and uses. For example, you can copy objects across both workfiles and databases using wildcards and patterns. See “Copying Objects” for details on these additional features.
Copy-and-Pasting Objects
The standard EViews copy command makes a copy of the object in the same workfile. When two workfiles are in memory at the same time, you may copy objects between them using copy-and-paste.
Highlight the objects you wish to copy in the source workfile. Then select Edit/Copy from the main menu.
Select the destination workfile by clicking on its titlebar. Then select either Edit/Paste or Edit/Paste Special... from the main menu or simply Paste or Paste Special... following a right mouse click.
Edit/Paste will perform the default paste operation. For most objects, this involves simply copying over the entire object and its contents. In other cases, the default paste operation is more involved. For example, when copy-and-pasting series between source and destination workfiles that are of different frequency, frequency conversion will be performed, if possible, using the default series settings (see “Frequency Conversion” for additional details). EViews will place named copies of all of the highlighted objects in the destination workfile, prompting you to replace existing objects with the same name.
If you elect to Paste Special..., EViews will open a dialog prompting you for any relevant paste options. For example, when pasting series, you may use the dialog to override the default series settings for frequency conversion, to perform special match merging by creating links (“Series Links”). In other settings, Paste Special... will simply prompt you to rename the objects in the destination workfile.
Freezing Objects
The second method of copying information from an object is to freeze a view of the object. If you click Object/Freeze Output or press the Freeze button on the object’s toolbar, a table or graph object is created that duplicates the current view of the original object.
Before you press Freeze, you are looking at a view of an object in the object window. Freezing the view makes a copy of the view and turns it into an independent object that will remain even if you delete the original object. A frozen view does not necessarily show what is currently in the original object, but rather shows a snapshot of the object at the moment you pushed the button. For example, if you freeze a spreadsheet view of a series, you will see a view of a new table object; if you freeze a graphical view of a series, you will see a view of a new graph object.
Frozen graphs are a bit more sophisticated than other frozen objects. While frozen tables do not change when the workfile sample or data change, you may select if and when a frozen graph should update as the sample or its underlying data change. You may treat a frozen graph as a snapshot of the data at the time it was frozen, or update it at will. For a complete discussion of graph updating, see “Freezing a Graph View”.
The primary feature of freezing an object is that the tables and graphs created by freezing may be edited for presentations or reports. Many options for customization are only available for frozen objects or may be deleted when the object is refreshed, so you should be sure to freeze an object before customizing it.
Deleting Objects
To delete an object or objects from your workfile, select the object or objects in the workfile directory. When you have selected everything you want to delete, click Delete or Object/Delete Selected on the workfile toolbar. EViews will prompt you to make certain that you wish to delete the objects.
Printing Objects
To print the currently displayed view of an object, push the Print button on the object window toolbar. You can also choose File/Print or Object/Print on the main EViews menu bar.
EViews will open a Print dialog containing the default print settings for the type of output you are printing. Here, we see the dialog for printing text information; the dialog for printing from a graph will differ slightly.
The default settings for printer type, output redirection, orientation, and text size may be set in the Print Setup... dialog (see “Print Setup”) or they may be overridden in the current print dialog.
For example, the print commands normally send a view or procedure output to the current Windows printer. You may specify instead that the output should be saved in the workfile as a table or graph, spooled to an RTF or ASCII text file on disk, sent to a spool object. or CSV file. Simply click on Redirect, then select the output type from the list.
The “(graphs print)” in the entries indicates that graphs will still be sent to the printer since the specified redirect type does not support graph output.
Storing Objects
EViews provides three ways to save your data on disk. You have already seen how to save entire workfiles, where all of the objects in the workfile are saved together in a single file with the “.WF1” extension. You may also store individual objects in their own data bank files. They may then be fetched into other workfiles.
We will defer a full discussion of storing objects to data banks and databases until “EViews Databases”. For now, note that when you are working with an object, you can place it in a data bank or database file by clicking on the Object/Store to DB… button on the object's toolbar or menu. EViews will prompt you for additional information.
You can store several objects, by selecting them in the workfile window and then pressing the Object/Store selected to DB… button on the workfile toolbar or menu.
Fetching Objects
You can fetch previously stored items from a data bank or database. One of the common methods of working with data is to create a workfile and then fetch previously stored data into the workfile as needed.
To fetch objects into a workfile, select Object/Fetch from DB… from the workfile menu or toolbar. You will see a dialog box prompting you for additional information for the fetch: objects to be fetched, directory and database location, as applicable.
See “Fetching Objects from the Database” for details on the advanced features of the fetch procedure.
Updating Objects
Updating works like fetching objects, but requires that the objects be present in the workfile. To update objects in the workfile, select them from the workfile window, and click on Object/Update from DB… from the workfile menu or toolbar. The Fetch dialog will open, but with the objects to be fetched already filled in. Simply specify the directory and database location and click OK.
The selected objects will be replaced by their counterparts in the data bank or database.
See “Fetching Objects from the Database” and “Database Auto-Series” for additional details.
Copy-and-Paste of Object Information
You can copy the list of object information displayed in a workfile or database window to the Windows clipboard and paste the list to other program files such as word processing files or spreadsheet files. Simply highlight the objects in the workfile directory window, select Edit/Copy (or click anywhere in the highlighted area, with the right mouse button, and select Copy). Then move to the application (word processor or spreadsheet) where you want to paste the list, and select Edit/Paste.
If only object names and icons are displayed in the window, EViews will copy a single line containing the highlighted names to the clipboard, with each name separated by a space. If the window contains additional information, either because View/Display Comments (Label+/–) has been chosen in a workfile window or a query has been carried out in a database window, each name will be placed in a separate line along with the additional information.
Note that if you copy-and-paste the list of objects into another EViews workfile, the objects themselves will be copied.