Copies all or part of the active workfile page to a new workfile, or to a new page within the default workfile.
Syntax
pagecopy(options) [object_list]
where the optional object_list specifies the workfile objects to be copied. If object_list is not provided, all objects will be copied subject to the option restrictions discussed below.
If copying objects to a new page within the default workfile, you may choose to copy series objects (series, alphas, and links) by value or by link (by employing the “bylink” option). If you elect to copy by value, links in the source page will converted to ordinary series and alpha objects when they are copied. If you copy by link, series and alpha objects in the source page are converted to links when copied. The default is to copy by value.
If you copy objects to a new workfile, data objects must be copied by value.
Options
bylink | Specifies that series and alpha objects be copied as links to the source page. This option is not available if you use the “wf=” option, since linking requires that the destination page be in the same workfile as the source page. Automatically sets the “dataonly” option so that only series, alphas, links, and valmaps will be copied. |
smpl=smpl_spec | Specifies an optional sample identifying which observations from the source page are to be appended. Either provide the sample range in double quotes or specify a named sample object. The default is “@all”. |
rndobs=integer | Copy only a random subsample of integer observations from the specified sample. Not available with “bylink,” “rndpct,” or “prob.” |
rndpct=arg | Copy only a random percentage subsample of arg (a number between 0 and 100) of the specified sample. Not available with “bylink,” “rndobs,” or “prob.” |
prob=arg | Copies a random subsample where each observation has a fixed probability, prob, of being selected. prob should be entered as a percentage value (a number between 0 and 100). Not available with “bylink,” “rndobs,” or “rndpc” |
dataonly | Only series, alphas, links, and valmaps should be copied. The default is to copy all objects (unless the “bylink” option is specified, in which case only series objects are copied). |
nolinks | Do not copy links from the source page. |
wf=wf_name | Optional name for the destination workfile. If not provided, EViews will create a new untitled workfile. Not available if copying using the “bylink” option. |
page=page_name | Optional name for the newly created page. If not provided, EViews will use the next available name of the form “Untitled##”, where ## is a number. |
Examples
pagecopy(page=allvalue, wf=newwf)
will first create a new workfile named NEWWF, with a page ALLVALUE that has the same structure as the current page. Next, all of the objects in the active workfile page will be copied into the new page, with the series objects copied by value. In contrast,
pagecopy(bylink, page=alllink)
will instead create a page ALLLINK in the existing workfile, and will copy all series objects by creating links in the new page.
pagecopy(page=partcopy, bylink, smpl="1950 2000 if gender=""male""") a* *z
will create a new page named PARTCOPY in the existing workfile containing the specified subsample of observations, and will copy all series objects in the current page beginning with the letter “A” or ending with the letter “Z”. The objects will be copied by creating links in the new page.
pagecopy(page=rndcopy, smpl="1950 2000 if gender=""male""", rndobs=200, dataonly, nolinks)
creates a new workfile and page RNDCOPY containing a 200 observation random sample from the specified subsample. Series and alpha objects only will be copied by value from the source page.
Cross-references