全英文
3Writingtheprogram
openanexistingwork le:openc:\mypath\mywork
or
creatinganewwork lenamedmywork:workfilemyworku110000 Allvariablesusedhavetobedeclared rst Don’tforgettosaveitfromtimetotime!
Usecommentsextensivelytounderstandyourprogramlateron,commentlinesbeginwitha’,forexample:
’thisprogramcomputesVaRonsimulateddata
4Programvariables
(seealsounderhelp→EViewssearch)
Control(program)variables:namesbeginwitha!!anfang=1
!ende=!anfang+100 Generalvariablescoefaseriesxvector(10)vmatrix(10,3)mgroupg
Stringvariables(textenclosedindoublequotes):namesbeginwitha%
%str="Thisisastring"
youcanusestringstohelpyoubuildupcommandsandvariablenamesorasheadingsintables
Manipulatingstringvariables
–convertingastringvariablecontaininganumberintoanumberbyusingthe@valfunction%str=".05"
!nmbr=@val(%strng)
–convertinganumberintoastringvariable%strng=@str(!nmbr)–concatenatingstrings
%sampleperiod=""+@str(!anfang)+""+@str(!ende) Replacementvariables:EViewsallowsyoutoconstructcommandlinesusingthecontentsofstringandcontrolvariables.!i=1
seriesx!i%strng="new"seriesx%strng}
declaresaseriesnamedx1declaresaseriesnamedx
搜索“diyifanwen.net”或“第一范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,第一范文网,提供最新高等教育简单eviews命令(2)全文阅读和word下载服务。
相关推荐: